Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can somebody tell me what cause the mistake?

Dear all experts,

I am a new comer and doing a simple database worksheet for the junior. The
first thing we need to re-define the new "size" of the database to do some
future calculations.

I write some code in workbook open to initiate the name area:

Worksheets("Inventory").Activate

maxrow = 0

maxrow = Range("a7").CurrentRegion.Rows.Count

'Range("A7").Select
Range(Cells(8, "N"), Cells(maxrow, "N")).Name = "tbl_left"
bababa....

when the junior re-open the workbook after closed, the size of the database
does not growth even junior add rows of data before close. It seems the
currentregion does not work, I've tested it in VBE by press "F8".

Can somebody tell me my mistake is in concept or in coding ?



Best Regards,

ericsson





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Can somebody tell me what cause the mistake?

Hi,

probably you need something like this:

activeworkbook.names.add name:="tbl_left", refersto:= "'" & "Inventory"
& "'!" & "A8:N" worksheets("Inventory").range("a7").End(xlDown).Ro w

If I understood your question correctly.

Regards,
Ivan

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
where is the mistake? xavi garriga Excel Discussion (Misc queries) 8 September 24th 07 12:06 PM
mistake in formula pm Excel Discussion (Misc queries) 4 January 30th 06 05:31 PM
I saved it by mistake!!!! Ellie Ellis Excel Worksheet Functions 2 November 27th 05 09:40 PM
If I get the help box up by hitting F1 by mistake, how can I get . Last1Standin Excel Discussion (Misc queries) 1 February 17th 05 08:56 PM
i sent by mistake fish Excel Programming 1 February 11th 05 05:59 PM


All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"