View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default "Run application" based on condition...

Private Sub Workbook_Open()
On Error Resume Next
Application.Run "'PCP DATA & PRODUCTION.xls'!hide_sheets"
On Error goto 0
MsgBox "Hello, welcome to PCP Data & Production" & Format(Date,
"ddd d mmm yyyy")
End Sub

--
Regards,
Tom Ogilvy


"J.W. Aldridge" wrote:


Ok... Been lookin everywhere for something to help me understand how
to work this code... Not sure. If someone can help me figure out where
to insert this and make it functional, I promise I will figure it out
from there.


On Error Resume Next
'statements here
on error goto 0


Private Sub Workbook_Open()
Application.Run "'PCP DATA & PRODUCTION.xls'!hide_sheets"
MsgBox "Hello, welcome to PCP Data & Production" & Format(Date,
"ddd d mmm yyyy")
End Sub



Thanx