Worksheet shortcuts.

trevolly

Board Regular
Joined
Aug 22, 2021
Messages
120
Office Version
  1. 365
Platform
  1. Windows
Hi all.

I recently made a Daily log for work and part of this was a Hanover Sheet that could be filled in and with the help of some v clever members of this site, have a vba code in the worksheet that when actioned copies the Handover worksheet in to the next shifts Daily Log. This enables the Handover sheet to be saved from shift to shift, allowing vital info for each shift to be ready for the day / night.

This works well apart from……. On the Handover Sheet I have made some “jump to” shortcuts by putting a button in and then recording a macro allowing the user to jump to a certain part of the Handover sheet.

Macro consists of …..
Sub Marshalling()

‘Marshalling Macro

Range (“A106”). Select
End Sub

This works apart from when the Handover sheet is copied to the next shift. Then when these “jump to” shortcuts are pressed then the original Daily log workbook opens in the background (I suppose because that’s where the original Handover sheet and the macro shortcuts were recorded).

Is there any way to make one of these “jump to “ shortcuts / buttons on the Handover sheet without it referencing the original workbook and opening it?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
The script your showing does not refer to any particular Workbook or Worksheet.
So why pressing a button that only says: Range (“A106”). Select would cause another workbook to open is something I do not believe could happen. There must be something else in the script.
 
Upvote 0
It sounds as though you are using Form Control buttons. If you use ActiveX buttons instead I think you should be ok.
 
Upvote 0
Hi @Fluff. I inserted a shape (rectangle) and then recorded a macro, and with the mouse selected a cell I wanted to jump to and then stopped recording the macro. Then I applied the macro to the shape I inserted.

@My Aswer Is This Okay…. Not sure why I’d take the effort to write this if it’s not doing it….(sorry if u don’t believe me). I’m more than happy to record a video if it doing it and upload a link if it’s allowed. I’ve uploaded a screenshot of the vba code of the four “jump to” shortcuts that all do it.
 

Attachments

  • shortcuts.jpg
    shortcuts.jpg
    57 KB · Views: 7
Upvote 0
As I said, if you switch to ActiveX controls, I'm pretty sure you will be ok.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Glad to see you received a answer.
If you would like you can always use a double click event to run a script so no buttons would be needed.
Double click on Range("G1") and your script would run for example.
If your interested let me know.
 
Upvote 0
Another option would be to use Hyperlinks.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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