![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 21
|
please can someone tell me how i can run a macro as soon as a worksheet is opened Not Workbook)
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
You can place the name of your macro in the worksheet's activate event.
Tom |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Posts: 21
|
sorry tom it doesnt seem to work
can you explain in further detail Thanks |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
-1 rt click on sheet tab
-2 select view code -3 see left vb project window in vb editor -4 double click on sheet objects (i.e. sheet1) -5 Paste code into each sheet object -6 done
__________________
<MARQUEE>...........Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic...............The easiest thing to find is fault, don't be easy !.. --Anonymous--...</marquee> |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Paste your code...
When the sheet is activated, your code should run. Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|