vba - Make my button say hello -
i'm trying started vba excel , have added "developer" tab ribbon. have in module1 added small sub:
sub hello() msgbox ("hello world!") end sub
then i've created button in spreadsheet 1, right click , assigned hello it's macro.
by i'm thinking should work, when click on nothing happens.
further more, if open vba editor window again module1 have been edited, not containing actions?
sub hello() msgbox ("hello world!") end sub activesheet.shapes.range(array("button 2")).select selection.onaction = "hello" range("g15").select activesheet.shapes.range(array("button 2")).select application.goto reference:="hello"
whats mambo jambo? , why button not work? :(
and try messagebox without parantheses, quotes. so: msgbox "blabla" delete code after sub routine: accidentally generated macro recorder (without purpose).
Comments
Post a Comment