Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On 16 Apr, 12:47, Dave Peterson wrote:
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- Hide quoted text - - Show quoted text - The problem occurs when i run the macro Range Z1 is the file name which is also a purchase order number The error message is "Incorrect Function" Thanks |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So how do you run this subroutine?
What particular line causes the problem? What's the actual value in Z1? Oggy wrote: On 16 Apr, 12:47, Dave Peterson wrote: 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- Hide quoted text - - Show quoted text - The problem occurs when i run the macro Range Z1 is the file name which is also a purchase order number The error message is "Incorrect Function" Thanks -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On 16 Apr, 14:46, Dave Peterson wrote:
So how do you run this subroutine? What particular line causes the problem? What's the actual value in Z1? Oggy wrote: On 16 Apr, 12:47, Dave Peterson wrote: 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- Hide quoted text - - Show quoted text - The problem occurs when i run the macro Range Z1 is the file name which is also a purchase order number The error message is *"Incorrect Function" Thanks -- Dave Peterson- Hide quoted text - - Show quoted text - I am running Excel 2007 and the sub routine is run by a custom xml ribbon button. The value of Z1 varies but would be on a number and letters combines ie PO15 Thanks |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't know enough about the ribbon to know.
Oggy wrote: On 16 Apr, 14:46, Dave Peterson wrote: So how do you run this subroutine? What particular line causes the problem? What's the actual value in Z1? Oggy wrote: On 16 Apr, 12:47, Dave Peterson wrote: 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- Hide quoted text - - Show quoted text - The problem occurs when i run the macro Range Z1 is the file name which is also a purchase order number The error message is "Incorrect Function" Thanks -- Dave Peterson- Hide quoted text - - Show quoted text - I am running Excel 2007 and the sub routine is run by a custom xml ribbon button. The value of Z1 varies but would be on a number and letters combines ie PO15 Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF function returning incorrect result | Excel Worksheet Functions | |||
Incorrect Formula Error | Excel Discussion (Misc queries) | |||
Incorrect Counting of IF function | Excel Worksheet Functions | |||
RSQ function gives incorrect result | Excel Worksheet Functions | |||
Sum Function sometimes displays incorrect answer | Excel Worksheet Functions |