Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto_Open Macro Trying to Excel Excel Discussion (Misc queries) 2 April 13th 07 07:08 AM
Macro runs upon wkbk open, but no Workbook_Open or Auto_Open Macro Ron Coderre Excel Programming 2 September 26th 06 05:50 PM
auto_open macro travis Excel Programming 2 July 26th 06 02:06 PM
auto_open-macro Mr.T Excel Programming 1 November 22nd 05 11:25 AM
Auto_Open vs. macro John Wilson Excel Programming 0 September 22nd 03 05:44 PM


All times are GMT +1. The time now is 06:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"