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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,811
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
What it means is that you do not have a routine called include_logo in your workbook.
 

protect02476

New Member
Joined
Apr 1, 2010
Messages
6
Hi Rorya,

Thanks for the reply.

However, the routine works in excel 2003. It somehow goes missing aftering converting to 2007.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,811
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Did you just do a File-Save As and then choose xlsm?
 

protect02476

New Member
Joined
Apr 1, 2010
Messages
6

ADVERTISEMENT

No, I opened the file, hit convert and then saved. I let excel do it all.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,811
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Hit what Convert? If you open a 2003 file in 2007, it should just open it, not try and convert it.
 

protect02476

New Member
Joined
Apr 1, 2010
Messages
6

ADVERTISEMENT

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?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,811
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
No. In 2007 any file containing macros is treated the same, depending on your security settings. What is this Convert option you mention?
 

protect02476

New Member
Joined
Apr 1, 2010
Messages
6
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).
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,811
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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?
 

Forum statistics

Threads
1,148,182
Messages
5,745,210
Members
423,933
Latest member
ankushmukherjee

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
Top