View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
peyman peyman is offline
external usenet poster
 
Posts: 189
Default macro for button option

hi Jim,
I think either you didn't get what I'm gonna do or I haven't undrestand what
you are talking about!!
I have a command box and a button option in my worksheet it's a form
actually.what I want to do is, when I push the command box , it is scrolled
down at the end of the worksheet and the button option be selected.
I wanna do this by recording a macro.what I get from the record is the codes
related to
scrolling down not the button selection.the codes are like this:

Sub button()
'
' button Macro
' Macro recorded 13/09/2007 by payman
'

'
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 23
End Sub
as you can see after pushing the command box I can have only scroll down not
selecting button option.
thank you,
peiman