U
upendra
Hi,
I wrote the below code to copy formatting of the selected cell to
current cell. But its not working. Kindly let me know whats the fault
with the code
Public Function CopyFormat(myrng As Range)
If myrng.Interior.ColorIndex = xlNone Then
Exit Function
Else
ActiveCell.Interior.ColorIndex = myrng.Interior.ColorIndex
ActiveCell.Interior.Pattern = myrng.Interior.Pattern
End Function
Regards,
Upendra
I wrote the below code to copy formatting of the selected cell to
current cell. But its not working. Kindly let me know whats the fault
with the code
Public Function CopyFormat(myrng As Range)
If myrng.Interior.ColorIndex = xlNone Then
Exit Function
Else
ActiveCell.Interior.ColorIndex = myrng.Interior.ColorIndex
ActiveCell.Interior.Pattern = myrng.Interior.Pattern
End Function
Regards,
Upendra