Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Please help.. lost in code.


Its doing something! But each time, no matter what, its entering th
"any text" statement into the field

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Please help.. lost in code.


I added target.row=1 and target.column=3 to validate that the cell bein
changed is c1, it might be different in you case.



other should be actually Other

Make sure that you identifying correct cell., other wise you wil
always get any text


try this code


Dim t As String
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pic As Object
Dim dat As String


If Target.Row = 1 And Target.Column = 3 Then


Sheets("Sheet1").Select
dat = ActiveSheet.Range("C1").Value

If dat = "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\test.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 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=27830

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost in code Jim May Excel Discussion (Misc queries) 4 September 28th 07 01:37 PM
Please help.. lost in code. MarcB[_10_] Excel Programming 0 November 15th 04 09:16 PM
Please help.. lost in code. MarcB[_9_] Excel Programming 1 November 15th 04 07:57 PM
Please help.. lost in code. MarcB[_7_] Excel Programming 2 November 15th 04 05:19 PM
Please help.. lost in code. MarcB[_8_] Excel Programming 1 November 15th 04 04:29 PM


All times are GMT +1. The time now is 02:52 AM.

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

About Us

"It's about Microsoft Excel"