Sendkeys methods to work for range

Hertil

New Member
Joined
Sep 21, 2022
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Hi! This is my first thread on this forum, hope you understand me and help :)

I am working with excel for my personal project. I would to make a macro_button which changes formulas/text for hyperlink.
I have tried many options with sendkeys in macro but still have same problem. There are my codes I was trying:
VBA Code:
Sub ConvertButton()
 Range("D3:D20").Application.SendKeys ("{F2}{F9}")
End Sub

and:
VBA Code:
Sub SendKeys()
Range("D3").Select
Application.SendKeys ("{F2}{F9}")
Call SendKeys2
End Sub
Sub SendKeys2()
Range("D4").Select
Application.SendKeys ("{F2}{F9}")
End Sub
Sub SendKeys3()
[...]
Both codes have same problem, they change only one cell to hyperlink. In first case only "D3" cell is generate for hyperlink but second case generates only "D4" cell.
I would to make macro that change every cell in Range(D3:D20). Have you any ideas?

Glad you trying, thanks!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,429
Messages
6,124,834
Members
449,192
Latest member
mcgeeaudrey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top