Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using CreateObject in Access to rummage around in an Excel worksheet for data I am copying into the database
How can I determine what the bounds of the occupied area of the worksheet are? I see objects showing the bounds of active areas are, but nothing that shows the full range of used cells. I need these vaules to limit the for/next loops that are doing the rummaging. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The UsedRange property of the Worksheet object returns a
Range object with the adaptly named Used Range. I believe you can access this property. HTH. -----Original Message----- I am using CreateObject in Access to rummage around in an Excel worksheet for data I am copying into the database. How can I determine what the bounds of the occupied area of the worksheet are? I see objects showing the bounds of active areas are, but nothing that shows the full range of used cells. I need these vaules to limit the for/next loops that are doing the rummaging. . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ian,
You can try something like this in a code window for the selected sheet. The message box will show you the beginning and ending cells that are used on the worksheet. Sub UsedCells1() ActiveSheet.UsedRange.Select MsgBox UsedRange.Address End Sub HTH Chris Hoffman "Ian Smith" wrote in message ... I am using CreateObject in Access to rummage around in an Excel worksheet for data I am copying into the database. How can I determine what the bounds of the occupied area of the worksheet are? I see objects showing the bounds of active areas are, but nothing that shows the full range of used cells. I need these vaules to limit the for/next loops that are doing the rummaging. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Interesting. I was looking at the UsedRange object in Access' debug window and didn't see anything relevant. Looking again now, it doesn't admit to an address property, but by explicitly asking for the address, I get what I was after. Thanks a bunch.
|
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use
Worksheet.UsedRange.HasArray If Worksheet.UsedRange.HasArray = true the -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
determine a range using a formula | Excel Worksheet Functions | |||
Determine if a value in a range is close to the value of another c | Excel Worksheet Functions | |||
Determine if a value in a range is close to the value of another c | Excel Worksheet Functions | |||
Determine whether a value is in a range of cells | Excel Discussion (Misc queries) | |||
Determine range with VBA | Excel Programming |