Hello,
I am trying to figure out a VBA code for creating a new workbook with data paste- but I seem to keep getting errors with whatever changes I make. Essentially I am trying to have excel (VBA) take a range from the active sheet in a workbook (under a locked worksheet/workbook), create a new workbook and paste the copied range to cells A1. Seems relatively simple but I think I may be having issues because the workbook and sheet are locked and issues referencing the activesheet instead of a specific sheet name. The workbook where the range is copied from will have a name though. (I can make a reference to the password in another cell for it to unlock- but I cant seem to get excel to do this correctly)
I included a simple code below but when I am trying to reference the activesheet it gives a subscript error. Also, I am having issues addressing the locked workbooks and sheets.
Any help would be greatly appreciated.
Thank you.
Bookmarks