Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
user form to copy and paste from source to destination
I have 2workbooks - a source data workbook and a destination dat
modelling workbook. Every month I need to copy select columns from on workbook to the other - the complication is that they are laid ou differently eg column A (source) needs to be pasted over the older dat of column J (destination). Most of the time the copy and paste format doesn't change so i woul like to have defaults set but have the option to change where to past to, if the source changes as I have no control over that workbook. I would also like to do this in one step if the default is true. Can I have a user form which allows me to select the source columns an paste into the destination columns through check boxes or drop dow lists and if so, how would i do this -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
user form to copy and paste from source to destination
as a first step use:
Sub Trythis() Dim UserRange As Range Dim UserDestination As Range On Error Resume Next Set UserRange = Application.InputBox _ (Prompt:="Select you source data Range", _ Title:="Listen to me:", _ Default:=Selection.Address, _ Type:=8) On Error GoTo 0 If UserRange Is Nothing Then MsgBox "Bay Bay!" End End If Set UserDestination = Application.InputBox _ (Prompt:="Select you Destination data Range", _ Title:="Listen to me:", _ Default:=Selection.Cells(1).Address, _ Type:=8) If UserDestination Is Nothing Then MsgBox "Bay Bay!" End End If UserRange.Copy UserDestination End Su -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
user form to copy and paste from source to destination
Thanks for this except i think i may need some more instructions on ho
to incorporate the code. When I create the User form - what do you suggest? Is this meant t work with check boxes and drop downs? I am imagining a user form which goes to the source sheet and allow you to select one of the columns, and then allows you to select th paste column from the destination. thank -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I copy & paste and keep the source formatting? | Excel Discussion (Misc queries) | |||
Copy Source Cells to Destination Cells Only when a Change Occurs | Excel Discussion (Misc queries) | |||
Excel-how to link source workbook to copy of destination workbook | Excel Worksheet Functions | |||
Paste names from a source workbook to a destination | Excel Discussion (Misc queries) | |||
How do I copy & paste formulas without them linking to the source | Excel Discussion (Misc queries) |