problem auto_open procedure
Posted by Luca Mondin on September 12, 2000 2:59 AM
I've this kind of problem.
I've written a routine (in Excel 97) that open another workbook (i.e. pippo.xls). In this workbook (pippo.xls) there is an event procedure (Workbook_Open()) in the Thisworkbook object.
With this event procedure I would to open new text file or copy/add some worksheets in other location but the procedure doesn't work.
Note: if I launch the event procedure from pippo.xls the routine works good.
The there is problem, when I open pippo.xls from another workbook.
Private Sub Workbook_Open()
Dim today As Stringtoday = Format(Now(), "dd-mm")
If Worksheets(1).Name = today
Then Exit Sub
Worksheets(1).Copy before:=Worksheets(1)Worksheets(1).Name = today
''''' at this point the procedure doesn't work because the new worksheet hasn't been added, and shapes are not ''''' selected
Many Thanks for your help.