Mac recorded Macro does not work with windows. Run-time error 1004

JKK2013

New Member
Joined
Nov 20, 2013
Messages
2
Hello all,

I have been given a macro recorded on a mac and it works fine with Mac Excel 2011. Unfortunately, I need to make it to work on a windows machine, but it comes up with an error message "macro unable to set width property of the window class. Run-time error 1004". When I press debug it takes me to the line .Width = 1456.

I have no experience with Macros, so I would really appreciate some help here please :)

Below is the chunk of the code that becomes highlighted when pressing debug.

With ActiveWindow
.Width = 1456
.Height = 795
End With

Thanks

Jessy
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
With any code you post I would suggest putting it in

[*code] Your code here [*/code] - but remove the *

before anyone see's :P

try:
Code:
With Application
    .WindowState = xlNormal
    .Width = 1456
    .Height = 795
End With
 
Last edited:
Upvote 0
Haha your very welcome. Thank you for the feedback.

I cant comment on a Mac because i have never used one :LOL:
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

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