Mary90
New Member
- Joined
- Sep 8, 2015
- Messages
- 22
Hi everyone.
Still quite new to using VBA, but learning a lot on this forum.
I'm writing a couple of simple macros to add to my personal workbook and then assign keyboard shortcuts to them to simplify everyday use. Things like paste values, add borders, make headings, etc...
One of the shortcuts I'd like to make is a quick Goto. Currently in Excel, when you type a cell address into the Name box, you get taken there directly. I want to copy a cell reference into the clipboard (Something like "Sheet3!B11") and then pres my keyboard shortut to run the macro.
The macro should then:
paste the copied value into a String variable
Go to the variable
What I have:
Any ideas / suggestions?
Thanks in advance!
Still quite new to using VBA, but learning a lot on this forum.
I'm writing a couple of simple macros to add to my personal workbook and then assign keyboard shortcuts to them to simplify everyday use. Things like paste values, add borders, make headings, etc...
One of the shortcuts I'd like to make is a quick Goto. Currently in Excel, when you type a cell address into the Name box, you get taken there directly. I want to copy a cell reference into the clipboard (Something like "Sheet3!B11") and then pres my keyboard shortut to run the macro.
The macro should then:
paste the copied value into a String variable
Go to the variable
What I have:
Code:
Sub QuickGoto()
Dim New_Ref As String
New_Ref = Paste 'This is where I have my issue. How to paste the copied value directly into my variable?
Application.Goto Reference:=New_Ref
End Sub
Thanks in advance!