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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding an 'Open' button on excel spreadsheet

Status
Not open for further replies.

Cillies

Technical User
Feb 7, 2003
112
0
0
GB
Hi,
I am trying to add a button on an excel spreadsheet, that when clicked will open a grahic image.

I can add the button to the spreadsheet, but don't know how to write the macro/VBA to direct the button, "when clicked", to open the image.

Hope someone can help.

Also where would I need to save the image? currently I have it as a seprate bmp and as an object on a spreadsheet.
 



Hi,

What do you mean by, "...open a graphic image..." ???

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Hi,
Thanks but I have figured it out. I simply created a userform added an object then entered the very difficult text in the VBA editor of "userform1.show" end sub.

But I now have another problem which I am sure is as simple, but as yet I cannot find the solution.

I have added a print button, accompanied by the code "userform1.print" However this automatically prints from the default printer. I want the button to bring up the print setup function which allows the user to select they're prefered printed eg. colour and their required format eg.landscape, etc.

I know I should probably open a new thread for this, but if you know of a simple solution that would be very userful.
 




Hi,

Isn't the process File/Print - Find Printer...

Don't you have a macro recorder?

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
The Problem is that I need the macro in a UserForm.

I have created a spreadsheet with a button on it that states 'view image'.

I also created a userform in VBA which holds the image, so when I click the button on the spreadsheet the image come up in the userform, when the userform is up, it won't allow me to record a macro, nor will it allow me to record one when in the Visual Basic editor (or else I am not going throughthe proper procedure).

 



go to the sheet and record a macro changing the printer.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top