Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Copy & Paste from One Workbook to a Macroed Template Workbook

Hello.
What I want to do is Open a Macroed Template Workbook (via Macro) from
another workbook.

The Template Workbook has ActiveSheet Protection & other macros which need
to be disabled prior to copying & pasting from My Workbook.

At the moment what I have been doing is Enabling the Macros on Open, then
running an ActiveSheet Unprotect macro, closing the file, then re-opening it
with Macros disabled, then copying & pasting a range from My Workbook.

I then use Save As and rename the New (Template) File.

My aim is to develop the files (& their automation), then pass both onto
another user, so ideally I want to bypass the Enable, Disable Close Re-open
portion before I do this.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default Copy & Paste from One Workbook to a Macroed Template Workbook

I think you have already done it!
I take it you have been recording macros rather than editing directly in the
VBA editor!
Keeping it simple if you go to your macro then click "step into" you can see
the recorded code. you could then copy and paste the active sheet unprotect
macro, workbook open macro and save rename macro all into one macro.

the code to open a workbook would be:
Sub OpenUp()
Workbooks.Open("C:\MyFolder\MyBook.xls")
ActiveWorkbook.Unprotect

End Sub




"VickiMc" wrote:

Hello.
What I want to do is Open a Macroed Template Workbook (via Macro) from
another workbook.

The Template Workbook has ActiveSheet Protection & other macros which need
to be disabled prior to copying & pasting from My Workbook.

At the moment what I have been doing is Enabling the Macros on Open, then
running an ActiveSheet Unprotect macro, closing the file, then re-opening it
with Macros disabled, then copying & pasting a range from My Workbook.

I then use Save As and rename the New (Template) File.

My aim is to develop the files (& their automation), then pass both onto
another user, so ideally I want to bypass the Enable, Disable Close Re-open
portion before I do this.

Any ideas?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste Template to New Workbook Polo78 Lacoste Excel Programming 11 April 30th 09 11:21 PM
copy and paste using code from workbook to workbook bigdaddy3 Excel Discussion (Misc queries) 2 September 14th 05 11:06 AM
Selecting data from 1 workbook to copy and paste to a 2nd workbook JackSpam Excel Programming 2 July 20th 05 02:33 AM
Need a macro to copy a range in one workbook and paste into another workbook Paul Excel Programming 8 July 1st 04 07:42 AM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"