Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autocopy instead of autofill
Hi all,
I use this code to autofill a range. Private Sub CommandButton1_Click() 'Macro_om_datum_te_genereren Dim rng As Range Set rng = ActiveSheet.Range("J9") rng.AutoFill Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)) End Sub Things is, don't want VBA to fill but to copy the information. What small modifcation needs to be done to get this code working?! Regards Sebastiaan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autocopy instead of autofill
from
rng.AutoFill Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)) to rng.copy destination:=Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)) "Basta1980" wrote: Hi all, I use this code to autofill a range. Private Sub CommandButton1_Click() 'Macro_om_datum_te_genereren Dim rng As Range Set rng = ActiveSheet.Range("J9") rng.AutoFill Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)) End Sub Things is, don't want VBA to fill but to copy the information. What small modifcation needs to be done to get this code working?! Regards Sebastiaan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autocopy instead of autofill
..autofill has several parms that you can include.
I'd try: rng.AutoFill _ destination:=Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)), _ type:=xlFillCopy Basta1980 wrote: Hi all, I use this code to autofill a range. Private Sub CommandButton1_Click() 'Macro_om_datum_te_genereren Dim rng As Range Set rng = ActiveSheet.Range("J9") rng.AutoFill Range(rng, rng.Offset(0, -1).End(xlDown).Offset(0, 1)) End Sub Things is, don't want VBA to fill but to copy the information. What small modifcation needs to be done to get this code working?! Regards Sebastiaan -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I autocopy text from one textbox to another using VBA in E | Excel Discussion (Misc queries) | |||
Autocopy formula in tables | Excel Discussion (Misc queries) | |||
Autocopy formula without VB | Excel Discussion (Misc queries) | |||
Autocopy formula to cells | Excel Discussion (Misc queries) | |||
Autocopy between 2 workbooks | Excel Programming |