A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

MSGBOX/Radio Button to select logo



 
 
Thread Tools Display Modes
  #1  
Old August 13th, 2004, 01:38 PM
LB79
external usenet poster
 
Posts: n/a
Default MSGBOX/Radio Button to select logo

I have a report template that is used for several different brands of my
company. When i use the template i want a MSGBOX to open up and list 3
buttons - 1 for each brand. When a button/brand is selected it will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not on the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks


---
Message posted from http://www.ExcelForum.com/

  #2  
Old August 13th, 2004, 10:21 PM
Dave Peterson
external usenet poster
 
Posts: n/a
Default MSGBOX/Radio Button to select logo

Maybe you could just have a macro that shows/prints/hides depending on the
choice of the user.

You could build a userform that looks pretty or use something like this. I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3). Change the
names to match your pictures and change the prompt to make more sense (company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different brands of my
company. When i use the template i want a MSGBOX to open up and list 3
buttons - 1 for each brand. When a button/brand is selected it will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not on the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #3  
Old August 19th, 2004, 03:19 AM
daniel chen
external usenet poster
 
Posts: n/a
Default

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides depending on the
choice of the user.

You could build a userform that looks pretty or use something like this.

I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3). Change

the
names to match your pictures and change the prompt to make more sense

(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different brands of my
company. When i use the template i want a MSGBOX to open up and list 3
buttons - 1 for each brand. When a button/brand is selected it will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not on the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson



  #4  
Old August 20th, 2004, 02:30 AM
daniel chen
external usenet poster
 
Posts: n/a
Default

Upon executing the "Testme" macro,
MsgBox said "Uable to get the Pictures property of the Worksheet class"
Debug line @ .Pictures("picture 1").Visible = False
What am I doing wrong? Please, I am trying to learn.

"Dave Peterson" wrote in message
...
After you put the picture on the worksheet (I use the "Insert Picture from

File"
icon on the drawing toolbar), you can select it (sometimes rightclicking

on it
is easier).

But after you select it, you can type the new name of the picture in the

namebox
(to the left of the formulabar). Remember to hit enter after you type the

new
name.

(You can use "Insert|Picture|from file" from the worksheet menubar, too.)

daniel chen wrote:

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides depending on

the
choice of the user.

You could build a userform that looks pretty or use something like

this.
I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3).

Change
the
names to match your pictures and change the prompt to make more sense

(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different brands

of my
company. When i use the template i want a MSGBOX to open up and list

3
buttons - 1 for each brand. When a button/brand is selected it will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not on

the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/

--

Dave Peterson


--

Dave Peterson



  #5  
Old August 20th, 2004, 10:51 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default

Do you have a picture on sheet1 that's named "Picture 1"?

Select the picture and look at the namebox -- to the left of the formulabar.



daniel chen wrote:

Upon executing the "Testme" macro,
MsgBox said "Uable to get the Pictures property of the Worksheet class"
Debug line @ .Pictures("picture 1").Visible = False
What am I doing wrong? Please, I am trying to learn.

"Dave Peterson" wrote in message
...
After you put the picture on the worksheet (I use the "Insert Picture from

File"
icon on the drawing toolbar), you can select it (sometimes rightclicking

on it
is easier).

But after you select it, you can type the new name of the picture in the

namebox
(to the left of the formulabar). Remember to hit enter after you type the

new
name.

(You can use "Insert|Picture|from file" from the worksheet menubar, too.)

daniel chen wrote:

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides depending on

the
choice of the user.

You could build a userform that looks pretty or use something like

this.
I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3).

Change
the
names to match your pictures and change the prompt to make more sense
(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different brands

of my
company. When i use the template i want a MSGBOX to open up and list

3
buttons - 1 for each brand. When a button/brand is selected it will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not on

the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #6  
Old August 21st, 2004, 07:41 AM
daniel chen
external usenet poster
 
Posts: n/a
Default

Yes, I was able to put 3 pictures in sheet1. I saw the names for each
picture in the namebox,
but those names were not the same as I tried to name them. They were
assigned by the computer as pictures 26,
picture 27 and picture 28. I don't know how to rename them. So, I changed
the names in the macro to reflect
them. Now, I see how your macro works.
I can only click on the picture, then Insert | Name | Define where I give
a name to refer to that picture #.
Is that how it works? Thanks for your patience.

"Dave Peterson" wrote in message
...
Do you have a picture on sheet1 that's named "Picture 1"?

Select the picture and look at the namebox -- to the left of the

formulabar.



daniel chen wrote:

Upon executing the "Testme" macro,
MsgBox said "Uable to get the Pictures property of the Worksheet class"
Debug line @ .Pictures("picture 1").Visible = False
What am I doing wrong? Please, I am trying to learn.

"Dave Peterson" wrote in message
...
After you put the picture on the worksheet (I use the "Insert Picture

from
File"
icon on the drawing toolbar), you can select it (sometimes

rightclicking
on it
is easier).

But after you select it, you can type the new name of the picture in

the
namebox
(to the left of the formulabar). Remember to hit enter after you type

the
new
name.

(You can use "Insert|Picture|from file" from the worksheet menubar,

too.)

daniel chen wrote:

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides

depending on
the
choice of the user.

You could build a userform that looks pretty or use something like

this.
I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3).

Change
the
names to match your pictures and change the prompt to make more

sense
(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different

brands
of my
company. When i use the template i want a MSGBOX to open up and

list
3
buttons - 1 for each brand. When a button/brand is selected it

will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not

on
the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



  #7  
Old August 21st, 2004, 12:03 PM
Dave Peterson
external usenet poster
 
Posts: n/a
Default

When the picture is selected, you can type the name in the namebox to the left
of the formulabar--not the insert|name|define dialog.

You could use a macro that does something like:

with activesheet
.pictures("Picture 26").name = "MyNewName"
end with



daniel chen wrote:

Yes, I was able to put 3 pictures in sheet1. I saw the names for each
picture in the namebox,
but those names were not the same as I tried to name them. They were
assigned by the computer as pictures 26,
picture 27 and picture 28. I don't know how to rename them. So, I changed
the names in the macro to reflect
them. Now, I see how your macro works.
I can only click on the picture, then Insert | Name | Define where I give
a name to refer to that picture #.
Is that how it works? Thanks for your patience.

"Dave Peterson" wrote in message
...
Do you have a picture on sheet1 that's named "Picture 1"?

Select the picture and look at the namebox -- to the left of the

formulabar.



daniel chen wrote:

Upon executing the "Testme" macro,
MsgBox said "Uable to get the Pictures property of the Worksheet class"
Debug line @ .Pictures("picture 1").Visible = False
What am I doing wrong? Please, I am trying to learn.

"Dave Peterson" wrote in message
...
After you put the picture on the worksheet (I use the "Insert Picture

from
File"
icon on the drawing toolbar), you can select it (sometimes

rightclicking
on it
is easier).

But after you select it, you can type the new name of the picture in

the
namebox
(to the left of the formulabar). Remember to hit enter after you type

the
new
name.

(You can use "Insert|Picture|from file" from the worksheet menubar,

too.)

daniel chen wrote:

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides

depending on
the
choice of the user.

You could build a userform that looks pretty or use something like
this.
I put
3 pictures on a worksheet (picture 1, picture 2 and picture 3).
Change
the
names to match your pictures and change the prompt to make more

sense
(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different

brands
of my
company. When i use the template i want a MSGBOX to open up and

list
3
buttons - 1 for each brand. When a button/brand is selected it

will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and not

on
the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #8  
Old August 21st, 2004, 07:23 PM
daniel chen
external usenet poster
 
Posts: n/a
Default

Hi Dave,
Yes, I got it.
Thank you very much.

"Dave Peterson" wrote in message
...
When the picture is selected, you can type the name in the namebox to the

left
of the formulabar--not the insert|name|define dialog.

You could use a macro that does something like:

with activesheet
.pictures("Picture 26").name = "MyNewName"
end with



daniel chen wrote:

Yes, I was able to put 3 pictures in sheet1. I saw the names for each
picture in the namebox,
but those names were not the same as I tried to name them. They were
assigned by the computer as pictures 26,
picture 27 and picture 28. I don't know how to rename them. So, I

changed
the names in the macro to reflect
them. Now, I see how your macro works.
I can only click on the picture, then Insert | Name | Define where I

give
a name to refer to that picture #.
Is that how it works? Thanks for your patience.

"Dave Peterson" wrote in message
...
Do you have a picture on sheet1 that's named "Picture 1"?

Select the picture and look at the namebox -- to the left of the

formulabar.



daniel chen wrote:

Upon executing the "Testme" macro,
MsgBox said "Uable to get the Pictures property of the Worksheet

class"
Debug line @ .Pictures("picture 1").Visible = False
What am I doing wrong? Please, I am trying to learn.

"Dave Peterson" wrote in message
...
After you put the picture on the worksheet (I use the "Insert

Picture
from
File"
icon on the drawing toolbar), you can select it (sometimes

rightclicking
on it
is easier).

But after you select it, you can type the new name of the picture

in
the
namebox
(to the left of the formulabar). Remember to hit enter after you

type
the
new
name.

(You can use "Insert|Picture|from file" from the worksheet

menubar,
too.)

daniel chen wrote:

Hi Dave,
How do I put pictures on a worksheet.
I can put bitmap on a worksheet, but not able to name it.
Thanks

"Dave Peterson" wrote in message
...
Maybe you could just have a macro that shows/prints/hides

depending on
the
choice of the user.

You could build a userform that looks pretty or use something

like
this.
I put
3 pictures on a worksheet (picture 1, picture 2 and picture

3).
Change
the
names to match your pictures and change the prompt to make

more
sense
(company
names?):

Option Explicit
Sub testme()

Dim Ans As Variant
Dim myPictName As String

Ans = InputBox(prompt:="1 = picture 1" & _
vbLf & "2 = picture 2" & _
vbLf & "3 = picture 3")

With Worksheets("sheet1")
'hide them all
.Pictures("picture 1").Visible = False
.Pictures("picture 2").Visible = False
.Pictures("picture 3").Visible = False

'show the one you want
myPictName = ""
Select Case Trim(Ans)
Case Is = "1": myPictName = "picture 1"
Case Is = "2": myPictName = "picture 2"
Case Is = "3": myPictName = "picture 3"
Case Else
MsgBox "Try again later"
Exit Sub
End Select


.Pictures(myPictName).Visible = True
.PrintOut preview:=True
.Pictures(myPictName).Visible = False
End With

End Sub




"LB79 " wrote:

I have a report template that is used for several different

brands
of my
company. When i use the template i want a MSGBOX to open up

and
list
3
buttons - 1 for each brand. When a button/brand is selected

it
will
choose the relevent logo and add it to the report.

If possible the logo will only appear on the print out and

not
on
the
screen.

Can anyone help me with this of is there an alternitive?

Many thanks

---
Message posted from http://www.ExcelForum.com/

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Group By Running & Setting Up Queries 3 August 5th, 2004 10:37 PM
Best way to find people on ALL lists. Anne Savage Running & Setting Up Queries 3 August 5th, 2004 07:24 PM
reset button, create excel, import table, send e-mail, create back-up matthew nance General Discussion 0 July 27th, 2004 06:52 PM
Using Combo Box to Select Date Range Sahil Running & Setting Up Queries 2 June 16th, 2004 01:22 PM
error in excel help. how to select a cell after clicking the Select All button? Dmitriy Kopnichev Links and Linking 3 December 5th, 2003 10:32 PM


All times are GMT +1. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.