Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Working with the range object

Hi Everyone,

I am setting up a 'report' of sorts in Excel (97), and I cannot
remember or find how to calculate the range when I have to add a
variable number of columns. I dont actually want to make a named
range, simply refer to a range in VBA.

For example:
dim r as Range
set r = Worksheets(ActiveSheet.Name).Range("A1:E2")

that bit works fine so far, but the report has some unknown number of
columns that will be added to the right of these cells, and in order
to set the formatting correctly for the right 'look' I need to be able
to add n columns to the right of E2. Can anyone point me in the right
direction? Its probably something really simple but I just cant
remember it or seem to dig it up.

Thanks in advance

The Frog
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Working with the range object

Thankyou fellas, much appreciated. You know, when you see the answers
that you just want to smack yourself in the head and DOH! My mental
block is now repaired, thankyou both so much.

Cheers

The Frog
Reply
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
Macro error, range object need data? Daniel Charts and Charting in Excel 1 June 15th 07 11:27 AM
Embedded Excel Object Stops Working dee Excel Discussion (Misc queries) 0 March 12th 07 02:56 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Method 'Range' of object '_global' failed higherlimits Excel Discussion (Misc queries) 3 June 23rd 06 06:16 PM
Range object without blank cells RMJames Excel Discussion (Misc queries) 1 January 24th 06 02:15 PM


All times are GMT +1. The time now is 01:02 PM.

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"