velohead
Board Regular
- Joined
- Aug 22, 2007
- Messages
- 212
Hi All,
I have a simple test macro that provides a sheet name in a message box.
Name just happens to be a property I show.
The macro works fine, and is as follows...
I wish to change the macro to look at objects not worksheets.
By objects, I mean objects such as buttons, shapes etc, i.e. those items that can be selected by using F5, Special, Objects.
There seems to be a lot of different objects, not sure what the generic name is for them, I thought it was Shapes and Shape.
So, as I am going around in circles, how would I tackle this please.
PS
Worksheet Name just happens to be the property I specified in macro 1
In macro 2, any shape property will suffice, eg Height, ID, Name, Type etc
Once this works, I can change the property.
I have a simple test macro that provides a sheet name in a message box.
Name just happens to be a property I show.
The macro works fine, and is as follows...
Code:
Sub WS_Name()
Dim n As Integer
n = InputBox("enter sheet number")
x = Worksheets(n).Name
MsgBox x
End Sub
I wish to change the macro to look at objects not worksheets.
By objects, I mean objects such as buttons, shapes etc, i.e. those items that can be selected by using F5, Special, Objects.
There seems to be a lot of different objects, not sure what the generic name is for them, I thought it was Shapes and Shape.
So, as I am going around in circles, how would I tackle this please.
PS
Worksheet Name just happens to be the property I specified in macro 1
In macro 2, any shape property will suffice, eg Height, ID, Name, Type etc
Once this works, I can change the property.