I want to pull in/copy over the values and formatting of a cell (the text color, the font size, bold etc) from one workbook to another.
As I understand it, using a standard cell referencing doesn't work, you need vba.
Here's some vba code which copies the formatting from a3 to a10 in the same worksheet:
Dim ping As Boolean
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("A3")) Is Nothing Then
If ping = False Then
Range("A3").Copy
Range("C10").PasteSpecial Paste:=xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
End If
ping = True
Exit Sub
Else
ping = False
End If
End Sub
How can I change this code to copy A3 from a different workbook named "mybook"?