View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Oggy Oggy is offline
external usenet poster
 
Posts: 49
Default Error - Incorrect Function


Hi
I have the following code in a addin to close a spreadshhet and go
back to the menu. Everything works fine but i keep getting a error
message Incorrect Function.


Sub backtomenupo()

Dim Filename As String
Filename = Range("z1").Value & ".xlsm"
Workbooks(Filename).Close savechanges:=True
Workbooks("Menu.xlsm").Activate
End Sub

Please advise how i can fix this problem

Thanks in advance