Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA create command button

Status
Not open for further replies.

peterd51

Technical User
Feb 22, 2005
109
GB
Hi,

I can create a button in Excel and add a macro to it...

next I want to have 'up' and 'down' arrows that the user can click on and it'll toggle a search on that column, then replace the existing arrow with the other one for next time.

I can do the search OK, it's changing the picture that has me beaten.

I tried using the 'arrow-lines' but it's messy as it adds a new 'line' number each time it's written and I can't delete the old one as I don't know the number.

So now I have two small .jpgs and I can load them up into the selected cell with, for instance...

Range("B1").Select
ActiveSheet.Pictures.Insert ("C:\up.jpg")

But I can't see how to delete a single picture when I load up the 'other' one, I can only delete /all/ pictures on a sheet with ActiveSheet.Pictures.Delete.

Also, how could I position the pictures to the right of the cell allowing for a title on the left?

Or is there a better way of doing this please?

Regards
Peter


 
Probably better to ask in forum707. This is VB5 & 6.
 
Hi,


sorry, I didn't see it'd changed forums on me!

Regards
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top