Sheila Yau
New Member
- Joined
- Nov 29, 2006
- Messages
- 20
Hi All,
I am trying to adapt this macro so that instead of specifiying the Range("A1:B20") in the macro, it will perform the task on the cells a user has highlighted in the excel worksheet.
This is so they can perform the macro in any cells/worksheets in a workbook.
Sub f2enter()
Dim c As Range
For Each c In Range("A1:B20").Cells
c.Select
SendKeys "{F2}", True
SendKeys "{ENTER}", True
Next
End Sub
Thanks
Sheila
I am trying to adapt this macro so that instead of specifiying the Range("A1:B20") in the macro, it will perform the task on the cells a user has highlighted in the excel worksheet.
This is so they can perform the macro in any cells/worksheets in a workbook.
Sub f2enter()
Dim c As Range
For Each c In Range("A1:B20").Cells
c.Select
SendKeys "{F2}", True
SendKeys "{ENTER}", True
Next
End Sub
Thanks
Sheila