Hi,
I have an excel spreadsheet with 9 fixed columns but a variable number of rows. I have written some code that changes the formating of each cell and this works for the variable number of columns.
I am having problems trying to get the code run for the 9 columns instead of the one where the cursor is placed. My code is:
Sub ChangeFormats()
Variable = InputBox("type number of records", "edit recs")
For i = 1 To Variable
Application.SendKeys ("{F2}")
Application.SendKeys ("{F2}")
Application.SendKeys ("{ENTER}")
Next i
End Sub
Any help would be much appreciated.
Regards
Tubbsy123
I have an excel spreadsheet with 9 fixed columns but a variable number of rows. I have written some code that changes the formating of each cell and this works for the variable number of columns.
I am having problems trying to get the code run for the 9 columns instead of the one where the cursor is placed. My code is:
Sub ChangeFormats()
Variable = InputBox("type number of records", "edit recs")
For i = 1 To Variable
Application.SendKeys ("{F2}")
Application.SendKeys ("{F2}")
Application.SendKeys ("{ENTER}")
Next i
End Sub
Any help would be much appreciated.
Regards
Tubbsy123