Windows Name Now Has Changed ?

sbmaurer

New Member
Joined
Dec 12, 2011
Messages
25
Hello and happy Friday to everyone,

This may be a very simple question.

Somehow the name of my excel windows have changed to including a ".xlsm" at the end.

Specifically I used to be able to reference a window by writing

Code:
Windows("BIA Master Drop Down List").Activate

Now I need to reference by writing

Code:
Windows("BIA Master Drop Down List.xlsm").Activate

Can anyone shed some light as to how this changed, is there some setting that I turned on or off? I would like to know because on another users machine the code will not work because of this mis-naming.

Cheers!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hello and happy Friday to everyone,

This may be a very simple question.

Somehow the name of my excel windows have changed to including a ".xlsm" at the end.

Specifically I used to be able to reference a window by writing

Code:
Windows("BIA Master Drop Down List").Activate

Now I need to reference by writing

Code:
Windows("BIA Master Drop Down List.xlsm").Activate

Can anyone shed some light as to how this changed, is there some setting that I turned on or off? I would like to know because on another users machine the code will not work because of this mis-naming.

Cheers!

It is probably in your Windows application settings(Control Palnel), where you can opt to show file extensions or not. If you opt to show the file extension, then you must use it in your code because it is part of the file name.
And it will apply to all applications, Word, power point, Outlook, etc.
 
Upvote 0
The latter syntax will always work, so it is greatly preferable.
 
Upvote 0
Good answer...............additionally you can always tell which form to use by examining the Caption:

Code:
Sub marine()
MsgBox Application.ActiveWindow.Caption
End Sub
 
Upvote 0
Hello,

Thanks everyone this certainly solves the problem. Two key things to mention.

1) Went to the control pannel and restored default settings and that did change the name of the window
2) Used the latter syntax above with the ".xlsm" extension and the code works on all types of window naming conventions


Thanks for the help,

Cheers!
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

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