LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default CurrentRegion.Address

Hello guys, a difficult queston, in my opinion:

I'm using Excel VBA to retrieve informations from an Access Database.
As SQL's results are variable, I need to use a loop to increment data
and generate a list.

ActiveCell.CurrentRegion.Address is the command that returns me something
like "$G$5" (if one cell unmerged is selected) or "$A$2:$B$2" (if it's a
range or more than one single cell).

Basically, after opening and editing document, all these references get lost.
When I select (using still VBA) one range to use function "COUNTIF()", excel
missunderstands these ranges and my sums goes wrong between circular
references and others columns or rows.
For List generation, I'm using a for loop to increment Cells(i,j).Value.

I've created a small macro to indicate me what is the range that I'm working.
Unfortunately, when I select a cell (that is not merged), it returns me
something like "$A$25:$K$31".

What should I do?
I really appreciatte your help.

Thanks,
 
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
currentregion flow23 Excel Discussion (Misc queries) 13 November 23rd 05 05:02 PM
CurrentRegion less one Row GregR Excel Programming 8 November 7th 05 05:16 PM
UsedRange and CurrentRegion Tomas M.[_2_] Excel Programming 5 September 16th 04 03:23 PM
CurrentRegion Steph[_3_] Excel Programming 2 August 10th 04 07:00 PM


All times are GMT +1. The time now is 12:59 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"