• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro bug when transferring from sheet to workbook level

jenden888

New Member
Hi all,
Newbie question I guess :)
I am using macros made by someone else.
There were made to work at the sheet level but I want them to work also at the workbook level. I found (I think) how to change the Private Sub to workbook but the Sub Undo is not working at the workbook level.

Any help would be greatly appreciated.
 

Attachments

  • test3.xlsm
    20.2 KB · Views: 2
Hi ,

It is not really a bug ; when you are dealing with named ranges at the Workbook level , you need to remember that since the Target.Address only returns the range reference , you need to include the sheet reference also.

See the attached file.

Narayan
 

Attachments

  • test3.xlsm
    19.2 KB · Views: 3
Thanks Narayan. Absolutely awesome! I have some programming experience but none in VBA, so I understand the logic.
Do you work in programming, data analysis or something similar? Hope I'm not too personal :)
 
Hi ,

Thanks. Like you , I have some programming experience , but that was some time back. Now , I answer only the simpler questions !

Narayan
 
Back
Top