Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button Macro - One command but does two things ???
I created a simple button at the top of a sheet that, when clicked, takes the
user from line 150 (2-148 are hidden) down to cell A315. The VB reads: Private Sub CommandButton8_Click() ActiveWindow.SmallScroll Down:=165 End Sub Here's what's going on: 1. Open the sheet. 2. Click the button. Taken to line 167 at top of view (no specific cell focus) 3. Scroll up and click again. Taken to bottom where it should be (no cell focus) 4. If I use another button I created to take user back up to top, with the following VB: Private Sub CommandButton9_Click() ActiveWindow.SmallScroll Up:=126 Range("B150").Select End Sub Taken to top, focus is in cell B150 (where it should be) 5. If I try to click the button to go back down again, nothing happens. 6. Click in any other cell and then click button. Taken to line 167 (no cell focus) What's going on with the screwy looping? Am I not using the proper commands? How does it work sometimes and not others? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use Macro To Change Which Macro Assigned To Command Button | Excel Discussion (Misc queries) | |||
Run a macro using a command button | Excel Discussion (Misc queries) | |||
Run Macro from Command Button | Excel Discussion (Misc queries) | |||
Macro/Command Button | Excel Programming | |||
Command Button & Macro | Excel Programming |