![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 15
|
I have a raised image (that was originally a command button) on a sheet that I am using like a button in Excel 97. This image is copied and pasted to a new location as needed. Everything is working great except now the click event will not fire due to the image name property not being renamed in the vba code. Below is a snippet of the existing code.
ActiveSheet.Shapes("CalendarC").Select Selection.Copy colLocBeg = colNewLoc & "23" Range(colLocBeg).Select ActiveSheet.Paste colLocName = "Calendar" & colNewLoc Selection.Name = colLocName colLocBeg = colNewLoc & "102" Range(colLocBeg).Value = colLocName The Selection.Name is not working. The new name appears in the name box above the A column but the property of the object does not change from Image1 to the new name thus causing the click event to not fire. It worked perfectly when it was a button but I wanted a picture on the object. Anyone with any ideas. Thanks in advance. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
I do not understand your code...
If you were doing well with a commandbutton, then insert your image on the same. See the picture property in the commandbutton's properties... Tom |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 15
|
Yes, you are correct. I let myself get tripped up on which objects are usable in Excel97 (from Forms menu vs Control Toolbox) when actually creating the popup calendar itself. Thanks for making me step away and reevaluate the situation.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|