View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Error - Incorrect Function

What line causes the problem?
What's in Z1 of the activesheet?
What's the exact error message that you see?

Oggy wrote:

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


--

Dave Peterson