T
Titoun
Hello, (I'm just started with VBA..)
I am trying to copy the format (font, interior and value)
of a cell to another by a VBA function.
The below Sub is working well but I need it under
function. Did you have any idea on how correct the below
function or did you have another one in stock.
Sub Copy_Format_And_Value_Of_One_Cell_In_Active_Cell()
Rng = InputBox("Adresse of the cell", "Copy Formats")
Range(Rng).Copy
ActiveCell.PasteSpecial Paste:=xlFormats
ActiveCell.Value = Range(Rng)
Application.CutCopyMode = False
End Sub
Function Cop_Form(InRange As Range)
For Each cellule In InRange
Range(cellule).Copy
ActiveCell.PasteSpecial Paste:=xlFormats
ActiveCell.Value = Range(cellule)
Application.CutCopyMode = False
Next cellule
End Function
Thanks in advance for your great help.
Titoun
I am trying to copy the format (font, interior and value)
of a cell to another by a VBA function.
The below Sub is working well but I need it under
function. Did you have any idea on how correct the below
function or did you have another one in stock.
Sub Copy_Format_And_Value_Of_One_Cell_In_Active_Cell()
Rng = InputBox("Adresse of the cell", "Copy Formats")
Range(Rng).Copy
ActiveCell.PasteSpecial Paste:=xlFormats
ActiveCell.Value = Range(Rng)
Application.CutCopyMode = False
End Sub
Function Cop_Form(InRange As Range)
For Each cellule In InRange
Range(cellule).Copy
ActiveCell.PasteSpecial Paste:=xlFormats
ActiveCell.Value = Range(cellule)
Application.CutCopyMode = False
Next cellule
End Function
Thanks in advance for your great help.
Titoun