windows.activate doesn't work in excel 2010

rnl0085

Board Regular
Joined
Dec 3, 2010
Messages
69
after a recent upgrade to excel 2010 suddenly the windows(excel file name).activate function doesn't work anymore..

i run a macro, open another file, do something, close the other file, and then try to activate the old file again from which the macro in first instance was run...however when i put a ' in front of the windows activate line it works again..

has anyone seen this before?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I have Excel 2010 and Windows("Filename").Activate works just fine. Try posting your code and someone should be able to pinpoint the problem.
 
Upvote 0
In what situation would you want to use that Windows().Activate?
 
Upvote 0
Your settings to "hide extensions" may have changed. Take a close look at the banner at the top of the window (the text before " - Microsoft Excel") to see if the file name as shown is the same as the filename captured in the macro.
I don't think there's a way to access the setting from within Excel. In File Manager, it's under "Tools" "Folder Options" "View". If the macro includes the extension in the filename, uncheck the box for "Hide extension for known file types".
Hope that helps,
Cindy
 
Upvote 0
thanks, i will look at the extension property tomorrow (at another pc)

i use it to switch between different excel files, if you have more excel files open, that it knows which file to switch to (and perform in a sheet in that file a new operation/macro/code)
 
Upvote 0
And why not handling all files in one and the same window?
 
Upvote 0
There should be no need to activate or select anything to do this.

You can easily create references to the relevant workbook, the workbook the code is in and the workbook being opened.

Then you can use those throughout the code when you need to refer to those workbooks.

Finally you close the workbook that was opened and you should be back where you started.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,876
Members
452,949
Latest member
Dupuhini

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