ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel 2007 vs. 2003 VBA Control Questions (https://www.excelbanter.com/excel-discussion-misc-queries/144405-excel-2007-vs-2003-vba-control-questions.html)

Ondy2112

Excel 2007 vs. 2003 VBA Control Questions
 
Hi,

Our place is starting to upgrade everyone to Office 2007 and some of the
Excel tools I developed for people to use aren't migrating from .xls to .xlsm
files very smooth. A quick example of what I am having trouble with is in
the names of some of my controls being changed.

In the old excel I have an app with a bunch of ComboBoxes, 4 of which are
named HomeList, HostList, HomeTypeList, and HostTypeList.

So I save the thing as a .xlsm file, and now the names of the same 4
ComboBoxes are now ComboBox14, ComboBox13, ComboBox12, and ComboBox11
respectively.

My assumption is that I just have to whip the app in shape until it all
works, but I was just wondering why this was happening and if there is a way
I could avoid it.

Thanks,
- Scott O.

Nick Hodge

Excel 2007 vs. 2003 VBA Control Questions
 
Scott

I have tried setting up my own xls with two combo boxes from the control
toolbox on sheet1 named HomeList and HostList. I then opened the xls in
2007 and saved as an xlsm, closed Excel and re-opened...fine.

Anything you are doing different?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/


"Ondy2112" wrote in message
...
Hi,

Our place is starting to upgrade everyone to Office 2007 and some of the
Excel tools I developed for people to use aren't migrating from .xls to
.xlsm
files very smooth. A quick example of what I am having trouble with is in
the names of some of my controls being changed.

In the old excel I have an app with a bunch of ComboBoxes, 4 of which are
named HomeList, HostList, HomeTypeList, and HostTypeList.

So I save the thing as a .xlsm file, and now the names of the same 4
ComboBoxes are now ComboBox14, ComboBox13, ComboBox12, and ComboBox11
respectively.

My assumption is that I just have to whip the app in shape until it all
works, but I was just wondering why this was happening and if there is a
way
I could avoid it.

Thanks,
- Scott O.



Ondy2112

Excel 2007 vs. 2003 VBA Control Questions
 
Thanks, Nick.

I did the same test you described here, and everything was fine. So it's
got to be something about this particular app. that it doesn't like. There
are bunch of labels, dropdowns, and a few command buttons. And everything
renames itself as I describe...

label1
label2
label3
etc.

comboBox1
comboBox2
comboBox3
etc.

CommandButton1
CommandButton2
CommandButton3
etc.

A few things I'm wondering are possibilities....

I know this was created before I even moved up to Excel2003, maybe it was
such an old version that it's no good now?

Could it be that there are TOO MANY controls on the page for the conversion
to handle? I doubt it, but you never know.

And the very strangest thing: If I just do a "Save as .xlsm...." and save
it, without closing it, the stuff is all still named what I want it to be.
It's only upon re-opening the .xlsm in 2007 that the control names all get
renamed incorrectly as I described above.

And on the messed-up version, if I start to rename the controls back to what
I want to, everything keeps successfully and is fine.

I'll keep banging my head and see if I can figure out what's causing this.

- Scott O.


"Nick Hodge" wrote:

Scott

I have tried setting up my own xls with two combo boxes from the control
toolbox on sheet1 named HomeList and HostList. I then opened the xls in
2007 and saved as an xlsm, closed Excel and re-opened...fine.

Anything you are doing different?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/


"Ondy2112" wrote in message
...
Hi,

Our place is starting to upgrade everyone to Office 2007 and some of the
Excel tools I developed for people to use aren't migrating from .xls to
.xlsm
files very smooth. A quick example of what I am having trouble with is in
the names of some of my controls being changed.

In the old excel I have an app with a bunch of ComboBoxes, 4 of which are
named HomeList, HostList, HomeTypeList, and HostTypeList.

So I save the thing as a .xlsm file, and now the names of the same 4
ComboBoxes are now ComboBox14, ComboBox13, ComboBox12, and ComboBox11
respectively.

My assumption is that I just have to whip the app in shape until it all
works, but I was just wondering why this was happening and if there is a
way
I could avoid it.

Thanks,
- Scott O.




Nick Hodge

Excel 2007 vs. 2003 VBA Control Questions
 
Scott

Excel only drops 'compatibility mode' when you close and re-open the file so
nothing will change until then as it thinks it is still an xls. I think it
may be an issue if it was originally an XL95 file, but don't know why.
Shouldn't be the number of controls but I know of no limit.

If you want to send me the file I'll take a look and see if I can see
anything?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/

"Ondy2112" wrote in message
...
Thanks, Nick.

I did the same test you described here, and everything was fine. So it's
got to be something about this particular app. that it doesn't like.
There
are bunch of labels, dropdowns, and a few command buttons. And everything
renames itself as I describe...

label1
label2
label3
etc.

comboBox1
comboBox2
comboBox3
etc.

CommandButton1
CommandButton2
CommandButton3
etc.

A few things I'm wondering are possibilities....

I know this was created before I even moved up to Excel2003, maybe it was
such an old version that it's no good now?

Could it be that there are TOO MANY controls on the page for the
conversion
to handle? I doubt it, but you never know.

And the very strangest thing: If I just do a "Save as .xlsm...." and save
it, without closing it, the stuff is all still named what I want it to be.
It's only upon re-opening the .xlsm in 2007 that the control names all get
renamed incorrectly as I described above.

And on the messed-up version, if I start to rename the controls back to
what
I want to, everything keeps successfully and is fine.

I'll keep banging my head and see if I can figure out what's causing this.

- Scott O.


"Nick Hodge" wrote:

Scott

I have tried setting up my own xls with two combo boxes from the control
toolbox on sheet1 named HomeList and HostList. I then opened the xls in
2007 and saved as an xlsm, closed Excel and re-opened...fine.

Anything you are doing different?

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/


"Ondy2112" wrote in message
...
Hi,

Our place is starting to upgrade everyone to Office 2007 and some of
the
Excel tools I developed for people to use aren't migrating from .xls to
.xlsm
files very smooth. A quick example of what I am having trouble with is
in
the names of some of my controls being changed.

In the old excel I have an app with a bunch of ComboBoxes, 4 of which
are
named HomeList, HostList, HomeTypeList, and HostTypeList.

So I save the thing as a .xlsm file, and now the names of the same 4
ComboBoxes are now ComboBox14, ComboBox13, ComboBox12, and ComboBox11
respectively.

My assumption is that I just have to whip the app in shape until it all
works, but I was just wondering why this was happening and if there is
a
way
I could avoid it.

Thanks,
- Scott O.






All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com