Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |