Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default macro to copy and paste between 2 workbooks

I have a Lotus file with 2 macros that i would like to
convert to Excel

The purpose of these 2 macros is to copy data from one
Lotus file to another, but as the data range being copied
into contains formulas, a "fix" macro is run to correct
the formula.

It would be nice to simply use the Excel copy and paste
features, but as the destination is protected, I need to
programatically unprotect the sheet, complete the paste,
then reprotect the sheet.

1st one is a copy macro
{sheetunprotect}
{IF @RANGENAME(A:C232..A:C232)=A:L313}{L 61}{R 2}{SELECT-
RANGE-RELATIVE 59;0;0}{EDIT-COPY}{ESC}{sheetprotect}{QUIT}

2nd one is a paste macro
[sheetunprotect}
{IF @RANGENAME(A:C256..A:C256)=A:L313}{L 61}{R 2}{EDIT-
PASTE-SPECIAL ;"CELL-CONTENTS"}{FIX}{sheetprotect}{QUIT}

where fix is a macro to simply copy over imported
formulas with formulas contained in a "master formula row"

{ESC}/CA:D350~A:D4..A:D302~/CA:K350~A:K4..A:K302~/CA:M350~
A:M4..A:M302~/CA:P350~A:P4..A:P302~/CA:R350~A:R4..A:R302~/
CA:U350~A:U4..A:U302~/CA:W350~A:W4..A:W302~/CA:Z350~A:Z4..
A:Z302~/CA:AB350..AF350~A:AB4..A:AB302~/CA:AH350~A:AH4..A:
AH302~/CA:AM350~A:AM4..A:AM302~/CA:AO350~A:AO4..A:AO302~/C
A:BE350..BI350~A:BE4..A:BE302~/CA:A351..A:BJ351~A:A3~

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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy and paste between workbooks keith Excel Discussion (Misc queries) 2 February 18th 09 04:46 PM
Can NOT copy / paste across workbooks CL Chuck Excel Discussion (Misc queries) 3 September 29th 07 06:01 PM
Can't Copy and Paste between Workbooks Tom at Galanti & Company PC Excel Discussion (Misc queries) 4 May 7th 07 01:05 PM
Copy and paste between workbooks Steve Boxler Excel Discussion (Misc queries) 0 August 25th 05 07:30 PM


All times are GMT +1. The time now is 02:07 PM.

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"