Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate cell data to another spreadsheet via Macro

Status
Not open for further replies.

joem28a

Technical User
Oct 15, 2002
26
0
0
AU
Hi folks,

Could somebody please assist me here. I wish to be able to duplicate data in another spreadsheet in the absolute cell. For example, my current spreadsheet contains a Macro, in that when you click on "ARL"; it changes the active cell to read "ARL" with all the attributes as below. What I wish to do after it formats the cell is to write to an absolute cell in another spreadsheet with the same information, formatting etc.

Sub Button_ARL_Click()
ToggleActiveCell "ARL", White, CellBold, FontSize8, Brown
goto spreadsheet 2 and do the same thing
End Sub

Thank you.

Regards,

Joe Maruca
Australia
 
If ARL is the activecell on the sheet after you have done your transformation then

with sheets("Sheet2").range(Activecell.address)
.value = activecell.value
.bold = true
.font.size = 8
.Other stuff - can't determine whether font is white or background is white - you get the idea ...
end with

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Hi there Geoff,

I tried your code in several different configurations; nothing happened to the other spreadsheet

Sub Button_ARL_Click()
ToggleActiveCell "ARL", White, CellBold, FontSize8, Brown
With Workbook("Sick_2").Sheet("Government M").Range(ActiveCell.Address)
.Value = ActiveCell.Value
.Bold = True
.Font.Size = 8
End With
End Sub

Do you have any other suggestions?. Many thanks.

Regards,

Joe.
 
Nope - there's nothing wrong with what I gave you. If nothing is happening, check your references to the worksheet - don't know why you have the workbook name in there.... What is the sheet called that "ARL" sits on ??
What is the sheet called that you want to change the data on
What properties do you want changed and what do you want them changed to ??

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top