Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

borders with unknown ranges

  Asked By: Ronnie    Date: Mar 11    Category: MS Office    Views: 627
  

I am just beginning to learn VBA and am having some difficulty on my
first project....

I am trying to set up macros to format a report I run. I have already
set it up to do all the header and footer formatting, but have no clue
how to set up the borders.

The problem is that every run of the report produces a different number
of rows (number of colums is fixed). I want to put a border going all
the way around the data, but do not know how to get excel to be able to
recognize where to place the borders given that I do not know how many
rows there will be.

Any suggestions?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Bobbie Gonzalez     Answered On: Mar 11

Just a shot in the dark... Dynamic named ranges??

 
Answer #2    Answered By: Jerrah Brown     Answered On: Mar 11

i don't know anything about dynamic named ranges...
does anyone have any info on that?

 
Answer #3    Answered By: Brandeis Fischer     Answered On: Mar 11

I've been out all week on holiday or would have answered
sooner. Here is a introduction to dynamic range names:

http://www.grbps.com/Excel5.pdf

You might also have a look at the VBA property .CurrentRegion

 
Answer #4    Answered By: Hadeel Khan     Answered On: Mar 11

I am not exactly sure how I will use it to
define my borders, but I think from the material you sent, I should
be able to figure it out once I have a little bit of time to fiddle
with it.

 
Didn't find what you were looking for? Find more on borders with unknown ranges Or get search suggestion and latest updates.




Tagged: