#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros


I have created a macro that can takes data from another spreadsheet, and
copies values individually into various cells. I am not copying the
the whole spreadsheet, only various bits.

My problems is, every time I run the macro, it duplicates the original
data. should i run the macro from a different spreadsheet, or should i
run it from the same spreadsheet. how can i avoid this duplication?

thanks


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default macros

Perhaps you should paste your code into a message...

Where does the duplication take place?

In article ,
Sheetal wrote:

I have created a macro that can takes data from another spreadsheet, and
copies values individually into various cells. I am not copying the
the whole spreadsheet, only various bits.

My problems is, every time I run the macro, it duplicates the original
data. should i run the macro from a different spreadsheet, or should i
run it from the same spreadsheet. how can i avoid this duplication?

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default macros


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/11/2003 by sheetal mehta
'

'
Windows("Book3").Activate
ActiveWindow.Zoom = 75
Cells.Replace What:="$", Replacement:="", LookAt:=xlPart
SearchOrder:= _
xlByRows, MatchCase:=False
Columns("A:A").Select
Selection.Copy
Windows("New_format_PL_071103_test.xls").Activate
Range("A1").Select
ActiveSheet.Paste
Windows("Book3").Activate
Columns("B:D").Select
Application.CutCopyMode = False
Selection.Copy
Windows("New_format_PL_071103_test.xls").Activate
Range("C1").Select
ActiveSheet.Paste
Windows("Book3").Activate
Columns("F:T").Select
Application.CutCopyMode = False
Selection.Copy
Windows("New_format_PL_071103_test.xls").Activate
Range("G1").Select
ActiveSheet.Paste
End Su

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

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
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM
Suppress the Disable Macros / Enable Macros Dialog Shoji Karai Excel Programming 5 September 24th 03 03:10 AM
List the Macros that can be executed from Tools-Macros Rob Bovey Excel Programming 1 July 10th 03 05:34 PM


All times are GMT +1. The time now is 12: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"