![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 12
|
If cell F3 contains text I want a message box run, I can do this with a number but having problems if cell contains text.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
Try: If worksheets("sheetname").range("f3").value = "text" then msgbox... Audiojoe |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 12
|
Not quite what I meant, cell F3 could contain any text not "text" the word. Basically if cell F3 contains any word I want a message box to run.
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Where the wild roses grow
Posts: 285
|
Here you go:
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Worksheets("sheet1").Range("f3").Value = "" Then Exit Sub Else MsgBox ("An entry has been made") End If End Sub Audiojoe [ This Message was edited by: Audiojoe on 2002-04-24 02:42 ] |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 12
|
Many Thanks sorted out the problem now. I had the extra problem that F3 cell was merged with G3 & H3 so I had to call the range as well.
Works perfectly now Thank you |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|