Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If IsEmpty(xbook.Application.Cells(I, 1)) Then
' do stuff... End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello there
I am using a nested loop to read from an Excel workbook. When I reach the first unused Cell, an "Object reference not set to an instance of an object" error is generated. How do I check if the cell if used or not? I tried: xbook.Application.Cells(I, 1).value().ToString.Length < 0 xbook.Application.Cells(i, 1).value() = Nothing and both did not work. Any ideas? Regards Sameh |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try If IsEmpty(xbook.worksheets("sheet1").Cells(I, 1)) Then ' do stuff... End If -- Regards Frank Kabel Frankfurt, Germany Sameh Ahmed wrote: Hello there I am using a nested loop to read from an Excel workbook. When I reach the first unused Cell, an "Object reference not set to an instance of an object" error is generated. How do I check if the cell if used or not? I tried: xbook.Application.Cells(I, 1).value().ToString.Length < 0 xbook.Application.Cells(i, 1).value() = Nothing and both did not work. Any ideas? Regards Sameh |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am working on .net visual basic
i added Imports Microsoft.Office.Interop.Excel but i still give the error; Name 'isempty' is not declared. any ideas? "Francesco Sblendorio" wrote in message ... If IsEmpty(xbook.Application.Cells(I, 1)) Then ' do stuff... End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can i restrict input in a cell until previous cell populated? | Excel Discussion (Misc queries) | |||
Last populated cell in a column | Excel Discussion (Misc queries) | |||
First populated cell in row array/ Last populated cell in row arra | Excel Worksheet Functions | |||
formula for a cell which is blank returns populated cell | Excel Discussion (Misc queries) | |||
Check to see if a cell is populated | Excel Worksheet Functions |