worksheet open

F

flow23

When I open the worksheet.. I want to execute few macros.. (name ... Getdata
, namesheet ,extra)

what code do I tupe in the Worksheet_open?
 
B

Bob Phillips

Private Sub Workbook_Open()
GetData
NameSheet
Extra
'[etc.
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)
 
W

Widemonk

There isnt a worksheet_open function, only worksheet_activate etc.

Dont you mean workbook_open ??... a set of macros to run as soo as you open
the file as opposed to flitting back-and-forth between the various worksheet
tabs ???
 
F

flow23

Yes.. as soon as I open the excel file

Widemonk said:
There isnt a worksheet_open function, only worksheet_activate etc.

Dont you mean workbook_open ??... a set of macros to run as soo as you open
the file as opposed to flitting back-and-forth between the various worksheet
tabs ???
 
F

flow23

I tried it.. but when I test it.. opening the file.. its gives error. . and
opens the VBcode????

Bob Phillips said:
Private Sub Workbook_Open()
GetData
NameSheet
Extra
'[etc.
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


flow23 said:
When I open the worksheet.. I want to execute few macros.. (name ... Getdata
, namesheet ,extra)

what code do I tupe in the Worksheet_open?
 
B

Bob Phillips

Do those macros exist? Did you store it where I suggested?

--

HTH

RP
(remove nothere from the email address if mailing direct)


flow23 said:
I tried it.. but when I test it.. opening the file.. its gives error. . and
opens the VBcode????

Bob Phillips said:
Private Sub Workbook_Open()
GetData
NameSheet
Extra
'[etc.
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


flow23 said:
When I open the worksheet.. I want to execute few macros.. (name ... Getdata
, namesheet ,extra)

what code do I tupe in the Worksheet_open?
 
F

flow23

Yes.. the Macro does exisit..

the error message says....

" Expected variable or procedure.. not module"

Bob Phillips said:
Do those macros exist? Did you store it where I suggested?

--

HTH

RP
(remove nothere from the email address if mailing direct)


flow23 said:
I tried it.. but when I test it.. opening the file.. its gives error. . and
opens the VBcode????

Bob Phillips said:
Private Sub Workbook_Open()
GetData
NameSheet
Extra
'[etc.
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


When I open the worksheet.. I want to execute few macros.. (name ...
Getdata
, namesheet ,extra)

what code do I tupe in the Worksheet_open?
 
Top