Hi all!
Does anyone could tell me why my macro was working until today?!
Thanks!
Hi all!
Does anyone could tell me why my macro was working until today?!
Thanks!
Here's a small format of my Excel file.
.
If you are running your macro from Sheet2 ... Excel assumes the sheet to paste to is Sheet2.
If you run your macro from Sheet1 .. Excel assumes you want to paste to Sheet1.
You can make the macro run from any sheet by specifying the sheet name to paste to, as seen here :
![]()
Please Login or Register to view this content.
Hi Logit...
I will try what you told me but here's the same file with a little addon that I forgot in to put in the first one.
When you select the second sheet the macro should run automatically.
Strangely all this was working fine until today!
Well, I copied and paste your code and I got the same error message.
Maybe you remind talking to me...check my previous post.
I had find the solution but apparently it hasn't last.
Maybe we can do it other way?!
If you select Sheet1 ... then close the workbook ... then re-open the workbook ... you can then select Sheet2 and when it is activated, the auto macro works.
If your desire is to have the macro run when the workbook opens, you will need to place your Call to the macro in the ThisWorkbook module like this :
![]()
Please Login or Register to view this content.
Excel does not consider opening the workbook to Sheet2 as "activating" Sheet2.
Activating a sheet only occurs when you come from a different worksheet ... to Sheet2.
The Error 1004 you are receiving ... I don't understand why. Your macro functions here without the error message.
Sorry but did I understand right???
You are saying that MY macro is working for you?!
Yes. Please see attached file.
I got the same error message...
...so it may be my software that is corrupted or something like this...do you think?
.
I agree. There is something else going on with your copy of Excel.
You can attempt to repair your installed version of Excel. Google for "Excel 2013 Repair"
Worse case scenario would be to reinstall Excel and see what happens.
Best wishes.
For those who would encounter the same issue...
Just delete files from
C:\Users\user name\AppData\Local\Microsoft\Office\16.0\OfficeFileCache
I did and now everything is working again.
.
Glad you found an answer.
Cheers !
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks