View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] s_smith_iet@hotmail.com is offline
external usenet poster
 
Posts: 66
Default Open a userform of one spread sheet with another spread sheet

when i use this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Run "NPI data entry form.xls!Macro1"
End Sub

it says it cannot find the macro

when i use this
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Run "'NPI data entry form.xls'!Macro1"
End Sub

i get subcript out of range