A
aehan
Hello all
I am trying to make an Addin to be distributed between several users. The
Addin will open and hide a workbook with macros. in the same way as Personal
Macro Workbook. My problem is that althought the addin works, the code I
wrote hides all of the windows, not just the workbook I want to hide, and
when I reference the workbook itself I get a run time error 9. The code I
have so far is:
Sub Open_and_Hide_Macros()
Set newBook = Workbooks.Open("C:\Documents and Settings\My
Documents\Excel\Practice\MyMacros.xls")
Windows("C:\Documents and Settings\My
Documents\Excel\Practice\MyMacros.xls").Visible = False
End Sub
Can anyone help please.
Thank you
Aehan
I am trying to make an Addin to be distributed between several users. The
Addin will open and hide a workbook with macros. in the same way as Personal
Macro Workbook. My problem is that althought the addin works, the code I
wrote hides all of the windows, not just the workbook I want to hide, and
when I reference the workbook itself I get a run time error 9. The code I
have so far is:
Sub Open_and_Hide_Macros()
Set newBook = Workbooks.Open("C:\Documents and Settings\My
Documents\Excel\Practice\MyMacros.xls")
Windows("C:\Documents and Settings\My
Documents\Excel\Practice\MyMacros.xls").Visible = False
End Sub
Can anyone help please.
Thank you
Aehan