Slight change needed for Code!

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Can "CopyFormat" be added to this VBA Code?

Sub MonthPlus()
With ActiveSheet.Buttons(Application.Caller).TopLeftCell
If .Column > 8 Then Cells(.Row - 43, .Column - 8).Select
ActiveCell.FormulaR1C1 = "=R[-2]C+30"

End With
End Sub


Thanks in advance.........Bob Vance
 
The cell 2 above of where select is, it is copy what's in there but not the
format?, TIA Bob

Myrna Larson said:
From which cell do you want to copy the format? The TopLeftCell?

Can "CopyFormat" be added to this VBA Code?

Sub MonthPlus()
With ActiveSheet.Buttons(Application.Caller).TopLeftCell
If .Column > 8 Then Cells(.Row - 43, .Column - 8).Select
ActiveCell.FormulaR1C1 = "=R[-2]C+30"

End With
End Sub


Thanks in advance.........Bob Vance
 
See answer in Misc or wherever else you posted this.

--
Regards,
Tom Ogilvy


Bob said:
The cell 2 above of where select is, it is copy what's in there but not the
format?, TIA Bob

Myrna Larson said:
From which cell do you want to copy the format? The TopLeftCell?

Can "CopyFormat" be added to this VBA Code?

Sub MonthPlus()
With ActiveSheet.Buttons(Application.Caller).TopLeftCell
If .Column > 8 Then Cells(.Row - 43, .Column - 8).Select
ActiveCell.FormulaR1C1 = "=R[-2]C+30"

End With
End Sub


Thanks in advance.........Bob Vance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top