Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Name and VBA


I am using several tables with one of them called Database. When I add
items to the other ones how do I create or redefine the range for a
range name using VBA?


--
Richard m


------------------------------------------------------------------------
Richard m's Profile: http://www.excelforum.com/member.php...fo&userid=2601
View this thread: http://www.excelforum.com/showthread...hreadid=519848

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Range Name and VBA

Here is one way

Range("A1").CurrentRegion.Name = "myFirstRange"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Richard m" wrote
in message ...

I am using several tables with one of them called Database. When I add
items to the other ones how do I create or redefine the range for a
range name using VBA?


--
Richard m


------------------------------------------------------------------------
Richard m's Profile:

http://www.excelforum.com/member.php...fo&userid=2601
View this thread: http://www.excelforum.com/showthread...hreadid=519848



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Name and VBA


Bob. I do not understand now that will help redifine the range. More o
what I am doing:

I am using code to open the form to add data. When the form closes,
want to redifine the range to inlcude the new data (just like using th
range name database). I am using two to three forms to enter data int
different tables

--
Richard

-----------------------------------------------------------------------
Richard m's Profile: http://www.excelforum.com/member.php...nfo&userid=260
View this thread: http://www.excelforum.com/showthread.php?threadid=51984

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Range Name and VBA

I can't say that I understand what you mean by '... the range name database
....', but currentregion picks up a range around a stated cell, so if you
always state its start cell, currentregion will go forward to the first
empty row and column, thereby picking up all the data.

If that isn't what you want, I think you need to be clearer on your data
etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Richard m" wrote
in message ...

Bob. I do not understand now that will help redifine the range. More on
what I am doing:

I am using code to open the form to add data. When the form closes, I
want to redifine the range to inlcude the new data (just like using the
range name database). I am using two to three forms to enter data into
different tables.


--
Richard m


------------------------------------------------------------------------
Richard m's Profile:

http://www.excelforum.com/member.php...fo&userid=2601
View this thread: http://www.excelforum.com/showthread...hreadid=519848



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Name and VBA


Yes Bob, that is want I want to do. I can then delete the old and
rename it. Thanks a lot.


--
Richard m


------------------------------------------------------------------------
Richard m's Profile: http://www.excelforum.com/member.php...fo&userid=2601
View this thread: http://www.excelforum.com/showthread...hreadid=519848

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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


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