Compile Error:Sub or Function not defined

protect02476

New Member
Joined
Apr 1, 2010
Messages
6
I tried converting an excel 2003 wb to 2007 and recieved this error message when clicking one of the macro enabled comboboxes in the wb:

Compile error: Sub or Fuction not defined

Private Sub Combobox2_Change()
Call include_logo (Combobox2.Value)
End Sub

I didn't write the VBA code so I will not be able to help much in answering any technical questions. I'd be willing to send the file to you for examination. Can anyone help? Thanks in advance!
 
Last edited:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
What it means is that you do not have a routine called include_logo in your workbook.
 
Upvote 0
Hi Rorya,

Thanks for the reply.

However, the routine works in excel 2003. It somehow goes missing aftering converting to 2007.
 
Upvote 0
Did you just do a File-Save As and then choose xlsm?
 
Upvote 0
Hit what Convert? If you open a 2003 file in 2007, it should just open it, not try and convert it.
 
Upvote 0
well, I want to use a 2003 file with 2007. I thought that was the proper way to handle a 2003 file in 2007, guess I'm confused. Aren't some macros disabled when opening a 2003 file in 2007?
 
Upvote 0
No. In 2007 any file containing macros is treated the same, depending on your security settings. What is this Convert option you mention?
 
Upvote 0
In 2007 if the file was created in an older version of excel there is a convert option in the main drop down menu for conevrting the file to a maco-enabled workbook (*.xlms).
 
Upvote 0
Ah, OK - I thought you were talking about an automatic prompt when you opened the file. That should work though. If I PM you an email address, can you send me the 2007 version?
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top