LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 65
Default Macro for Copying

Hello Sirs,

To be more clear the following is my VBA and my macro is in separate
workbook. Pls. see my comments which are the problems I encounterred. I made
the macro by recording macro, actually I am not an expert in macro.

This is my VBA:
Sub Frankcopy()
'
' Frankcopy Macro
' Macro recorded 1/23/2008 by Frank
'
' Keyboard Shortcut: Ctrl+Shift+F
'Franks comment, below is the workbook on sheet "PO New" and the range is
already fixed
'to be copied to many workbooks, What is the VBA to open the file, here I
opened it first
Windows("historical actual material pricebased on PO.xls").Activate
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("PO New").Select
Range("AW12:CB60").Select
Selection.Copy
'below is where the rage to be copied to, but what is the VBA to open
many files
' with the same Sheet name"PO new" and then close it after finish
performing copying
Windows("M10-7-004 DNP (2).xls").Activate
' below is the range where the above patterned range to be copied, the
rage is variable
'could go down upto so many lines with the pattern ( number of lines of
P.O) is the same
'could you teach me the VBA for this?, FOR YOUR INFO ON colum AV 12 down
there is number
'where we can use End.xlDown, but I do not know how to make it as the
range is to be
' copied to colum AW (After AV)
Range("AW12:AW60").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Sub

Thanks in advance
--
H. Frank Situmorang
 
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
copying with a Macro DonT Excel Worksheet Functions 2 March 24th 06 07:45 PM
Copying with a macro DonT Excel Worksheet Functions 2 March 23rd 06 03:04 AM
Copying Macro w/ different sheets liseladele Excel Worksheet Functions 1 March 22nd 06 01:43 AM
Copying cells with a macro MAWII Excel Discussion (Misc queries) 1 April 18th 05 06:50 PM
Copying with a macro Markxxx Excel Discussion (Misc queries) 1 January 13th 05 09:56 AM


All times are GMT +1. The time now is 12:05 AM.

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

About Us

"It's about Microsoft Excel"