Control Button Clone

G

Guest

In worksheet "Scorecard", six cells (E17:F19) are merged with text typed in (formatted text). Is there a way with VBA that when the user clicks on the merged cell range they are moved to worksheet "Customer", with cell A65 positioned at the top left corner? Inserting a control button with an attached macro is not allowed in this case.
 
T

Tom Ogilvy

Use the selectionchange event and Application.Goto

--
Regards,
Tom Ogilvy


Phil Hageman said:
In worksheet "Scorecard", six cells (E17:F19) are merged with text typed
in (formatted text). Is there a way with VBA that when the user clicks on
the merged cell range they are moved to worksheet "Customer", with cell A65
positioned at the top left corner? Inserting a control button with an
attached macro is not allowed in this case.
 
G

Guest

Tom, Thanks for your reply. Below is an example of code I'm using as attached to a Command button. What I need in this case is something similar, but without the use of the button. I'm sure your hint would point a programmer in the right direction, but I don't understand it. Could you go further? One thing I forgot to mention, the text appearing in the cell range is put there by a formula in the cell range, like =IF(G17<>"","1.1:",""). When the user types information in an adjacent cell, the cell range is populated accordingly. So, the only reason a user has for clicking on the cell range is to move to a different Worksheet, as described in my original post. Any help you can provide is sincerely appreciated. Thanks, Phi

Sub GoToCustomer(
Application.ScreenUpdating = Fals
Sheets("Customer").Selec
Application.Goto Reference:=Range("A1"), Scroll:=Tru
ActiveWindow.Zoom = 6
Application.ScreenUpdating = Tru
End Su
 
T

Tom Ogilvy

right click on the sheet with the cell and put in code like:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
if Target.Address = "$C$9" then
Application.ScreenUpdating = False
Sheets("Customer").Select
Sheets("Customer").Range("A1").Select
ActiveWindow.Zoom = 62
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
Application.ScreenUpdating = True
End If
End Sub

Works for me when C9 is clicked

--
Regards,
Tom Ogilvy



Phil Hageman said:
Tom, Thanks for your reply. Below is an example of code I'm using as
attached to a Command button. What I need in this case is something
similar, but without the use of the button. I'm sure your hint would point
a programmer in the right direction, but I don't understand it. Could you
go further? One thing I forgot to mention, the text appearing in the cell
range is put there by a formula in the cell range, like
=IF(G17<>"","1.1:",""). When the user types information in an adjacent
cell, the cell range is populated accordingly. So, the only reason a user
has for clicking on the cell range is to move to a different Worksheet, as
described in my original post. Any help you can provide is sincerely
appreciated. Thanks, Phil
 
G

Guest

Tom, I don’t understand the instruction as to where the code goes - "right click...". I tried it in the worksheet ("Scorecard") module having the cell to be clicked (click cell), and also in a general module. Can’t get it working either way and know I'm wrong, since it works for you. Is this code attached directly to the cell range? Looks like this Sub could develop into a fantastic navigation tool

When I posed the original thread, I didn’t know if the idea was even possible. If I can get this working, I would like to expand it further as follows

Worksheet Click Cell GoTo W/S GoTo Cel
Scorecard E7 Customer A
Scorecard E20 Customer A3
Scorecard E35 Financial A
Scorecard E38 Financial A3
.......
There are 12 click cells and GoTo cells in all

Would this be accomplished in one Sub, or individual Subs behind individual click cells

Thanks
Phi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top