ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Control Button Clone (https://www.excelbanter.com/excel-programming/289198-control-button-clone.html)

Phil Hageman[_3_]

Control Button Clone
 
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.

Phil Hageman[_3_]

Control Button Clone
 
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


Tom Ogilvy

Control Button Clone
 
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 wrote in message
...
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

Sub GoToCustomer()
Application.ScreenUpdating = False
Sheets("Customer").Select
Application.Goto Reference:=Range("A1"), Scroll:=True
ActiveWindow.Zoom = 62
Application.ScreenUpdating = True
End Sub




Phil Hageman[_3_]

Control Button Clone
 
Tom, I dont 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. Cant 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 didnt 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



All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com