Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto_open MAcro
I have a TOC(table of contents) macro and it works great. Also have the
auto_open macro to start on the first sheet. Trying to give users the option of creating the TOC sheet and then of course always start on that sheet. But would have NO auto_open unless they actually want the TOC sheet to be there. Somehow is there a way to have the TOC macro create also the auto open macro |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto_open MAcro
Dim StartLine As Long
With ActiveWorkbook.VBProject.VBComponents("Module1").C odeModule .InsertLines .CountOfLines, _ "Public Sub Auto_Open()" & vbCrLf & _ "Dim ans" & vbCrLf & _ " ans = Msgbox( ""All OK"",vbYesNo)" & vbCrLf & _ " If ans = vbNo Then Cancel = True" & vbCrLf & _ "End Sub" End With -- __________________________________ HTH Bob "John McCabe" wrote in message ng.com... I have a TOC(table of contents) macro and it works great. Also have the auto_open macro to start on the first sheet. Trying to give users the option of creating the TOC sheet and then of course always start on that sheet. But would have NO auto_open unless they actually want the TOC sheet to be there. Somehow is there a way to have the TOC macro create also the auto open macro |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto_Open Macro | Excel Discussion (Misc queries) | |||
Macro runs upon wkbk open, but no Workbook_Open or Auto_Open Macro | Excel Programming | |||
auto_open macro | Excel Programming | |||
auto_open-macro | Excel Programming | |||
Auto_Open vs. macro | Excel Programming |