keithkemble
Board Regular
- Joined
- Feb 15, 2002
- Messages
- 160
Folks,
I have a macro that will run perfectly if I alt F11 and step through it, or if I run to cursor and then step through it, BUT it will not run correctly when I use a macro button and assign the VBA.
The project consists of 2 workbooks
no 1 is the destination and both wbs are identical
no 2 is the source and at anytime only 1 third is visible and it is these visible ws that is copied to wb1
wb 2 has 3 ws that are always visible, the remainder changes dependant on region selected.
When I step thru (using alt F11) the routine is perfect, selecting and copy/paste only the visible regions wsheets.
IT is only when I put the final touch (button on the menu of WB1) that when pressed copies the first hidden section of wb2 and copies /paste to wb1
For some reason it is not selecting the fourth visible sheet but the fourth physical sheet
Does anyone have any ideas?
I can post code if required
I have a macro that will run perfectly if I alt F11 and step through it, or if I run to cursor and then step through it, BUT it will not run correctly when I use a macro button and assign the VBA.
The project consists of 2 workbooks
no 1 is the destination and both wbs are identical
no 2 is the source and at anytime only 1 third is visible and it is these visible ws that is copied to wb1
wb 2 has 3 ws that are always visible, the remainder changes dependant on region selected.
When I step thru (using alt F11) the routine is perfect, selecting and copy/paste only the visible regions wsheets.
IT is only when I put the final touch (button on the menu of WB1) that when pressed copies the first hidden section of wb2 and copies /paste to wb1
For some reason it is not selecting the fourth visible sheet but the fourth physical sheet
Does anyone have any ideas?
I can post code if required