J
JT
Dear all
I have checked the archives for a solution to this and have drawn a
blank.
I have an image "shpTrend" to which I want to attach the following
code:
Sub shpTrend_Click()
ThisWorkbook.ActiveSheet.Names("dKESelection").RefersToRange.Value =
"Trend uplift / downgrade"
Application.GoTo Reference:="dTrendUplift"
End Sub
This image, and the ranges "dTrendUplift" and "dKESelection" are
replicated on multiple worksheets and I want the code to use the
versions of the ranges that are in the same sheet as the image that
has been clicked.
The most efficient way of doing this, I believe, is to create the
image using control toolbox, and then replicate the code in each of
the relevant worksheet objects in visual basic. However, the image I
want to use already exists and took a long time to create (i.e.
draw). If there is a way of getting an existing image to be
controlled like a control toolbox image then this would save me a lot
of time.
Hopefully somebody can help with this.
Thanks
JT
I have checked the archives for a solution to this and have drawn a
blank.
I have an image "shpTrend" to which I want to attach the following
code:
Sub shpTrend_Click()
ThisWorkbook.ActiveSheet.Names("dKESelection").RefersToRange.Value =
"Trend uplift / downgrade"
Application.GoTo Reference:="dTrendUplift"
End Sub
This image, and the ranges "dTrendUplift" and "dKESelection" are
replicated on multiple worksheets and I want the code to use the
versions of the ranges that are in the same sheet as the image that
has been clicked.
The most efficient way of doing this, I believe, is to create the
image using control toolbox, and then replicate the code in each of
the relevant worksheet objects in visual basic. However, the image I
want to use already exists and took a long time to create (i.e.
draw). If there is a way of getting an existing image to be
controlled like a control toolbox image then this would save me a lot
of time.
Hopefully somebody can help with this.
Thanks
JT