Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I need to create a macro that opens up a specific excel file. This file has data that is split into twelve different columns (one for each month). I need this macro to create a msgbox that allows the user to select the month and then copy all the data in that row to the other document. Anyone have any ideas on this one? Thanks in Advance! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You say each month is in a column, then the user selects a specific colum
(month) and copies a row -- What row? assuming you mean column: You can select a column with Dim sh as Worksheet, bk as Workbook Dim rng as Range set bk = Workbooks.Open("C:\MyFolder\Myfile.xls") on error resume next set rng = Application.InputBox("select a column with your mouse",type:=8) On error goto 0 if rng is nothing then bk.close Savechanges:=false exit sub end if rng.EntireColumn.Copy Destination:= _ sh.Columns(3) bk.close Savechanges:=False -- Regards, Tom Ogilvy -- Regards, Tom Ogilvy "supamari0" wrote: Hi, I need to create a macro that opens up a specific excel file. This file has data that is split into twelve different columns (one for each month). I need this macro to create a msgbox that allows the user to select the month and then copy all the data in that row to the other document. Anyone have any ideas on this one? Thanks in Advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy most recent data from one workbook to another with a Macro | Excel Discussion (Misc queries) | |||
$%Macro to Copy from one workbook to other when matching data | Excel Discussion (Misc queries) | |||
Macro Help. Copy data from 1 workbook to another on next available | Excel Discussion (Misc queries) | |||
Macro to copy data into another workbook | Excel Discussion (Misc queries) | |||
macro to copy range data from another workbook | Excel Programming |