Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA search for value of a cell
I am working on some vba code in Excel 2000 with Microsoft Windows 2000. I want to select the first cell in a tab and see if it has a value in it. I would like the code to look something like this: sheets("firsttab").select range("a1").select set currentcell=activecell if current cell < "" then msgbox "There is data in the first tab", vbok end if Any idea what I am doing wrong? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA search for value of a cell
Assuming you have a Sub header and Footer
The only problem I see is the SPACE you currently have between "current cell" in your If line. HTH "Larry D" wrote in message oups.com: I am working on some vba code in Excel 2000 with Microsoft Windows 2000. I want to select the first cell in a tab and see if it has a value in it. I would like the code to look something like this: sheets("firsttab").select range("a1").select set currentcell=activecell if current cell < "" then msgbox "There is data in the first tab", vbok end if Any idea what I am doing wrong? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA search for value of a cell
If Sheets("FirstTab").Range("A1") < "" Then
MsgBox "There is data in the first tab", vbOK End If Regards, Alan "Larry D" wrote in message oups.com... I am working on some vba code in Excel 2000 with Microsoft Windows 2000. I want to select the first cell in a tab and see if it has a value in it. I would like the code to look something like this: sheets("firsttab").select range("a1").select set currentcell=activecell if current cell < "" then msgbox "There is data in the first tab", vbok end if Any idea what I am doing wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can we search duplicate cell in excel | Excel Worksheet Functions | |||
when I search for data in Excel, the found cell cannot be seen | Excel Discussion (Misc queries) | |||
Search in excel by date located in a cell | Excel Discussion (Misc queries) | |||
Excel - let search for more than one disconnected word in a cell | Excel Worksheet Functions | |||
Excel VBA - Search And Replace Cell data | Excel Programming |