ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   if x = true then do y, possible? (https://www.excelbanter.com/excel-programming/316523-if-x-%3D-true-then-do-y-possible.html)

MarcB[_5_]

if x = true then do y, possible?
 

I'm sure this is possible, just not sure how I should go about it.
have a drop-down list with a bunch of values and an "other" value. I
the user selects other I would like a image to be inserted on anothe
worksheet in a field. If any value is selected I would like a simpl
text line to be inserted in the same area on the other worksheet.

How would I go about this? Should I code this in VBA or can it b
included in some sort of cell formula?

Thank you

--
Marc
-----------------------------------------------------------------------
MarcB's Profile: http://www.excelforum.com/member.php...fo&userid=1498
View this thread: http://www.excelforum.com/showthread.php?threadid=27753


Ron de Bruin

if x = true then do y, possible?
 
Hi Marc

Start here
http://www.mcgimpsey.com/excel/lookuppics.html

--
Regards Ron de Bruin
http://www.rondebruin.nl


"MarcB" wrote in message ...

I'm sure this is possible, just not sure how I should go about it. I
have a drop-down list with a bunch of values and an "other" value. If
the user selects other I would like a image to be inserted on another
worksheet in a field. If any value is selected I would like a simple
text line to be inserted in the same area on the other worksheet.

How would I go about this? Should I code this in VBA or can it be
included in some sort of cell formula?

Thank you.


--
MarcB
------------------------------------------------------------------------
MarcB's Profile: http://www.excelforum.com/member.php...o&userid=14988
View this thread: http://www.excelforum.com/showthread...hreadid=277534




anilsolipuram

if x = true then do y, possible?
 

try this vba code

Dim t As String
Private Sub ComboBox1_Change()

Dim pic As Object


If ComboBox1.Value = "other" Then
Sheets("Sheet2").Select
ActiveSheet.Range("C6").Select
ActiveSheet.Range("C6").Value = ""
Set pic = ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\Administrator\My Documents\M
Pictures\rxvpheader.gif")
pic.Width = ActiveSheet.Range("C6").Width
pic.Height = ActiveSheet.Range("C6").Height
pic.Left = ActiveSheet.Range("C6").Left
pic.Top = ActiveSheet.Range("C6").Top
t = pic.Name
Application.CommandBars("Picture").Visible = False

Else
Sheets("Sheet2").Select
If t < "" Then
ActiveSheet.Shapes(t).Select
ActiveSheet.Shapes(t).Delete
t = ""
End If

ActiveSheet.Range("C6").Select


ActiveSheet.Range("C6").Value = ""
ActiveSheet.Range("C6").Value = "any text"
End If
End Su

--
anilsolipura
-----------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...fo&userid=1627
View this thread: http://www.excelforum.com/showthread.php?threadid=27753



All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com