View Full Version : Making Spreadsheet Bigger Depending On Incoming Data


cameron.scrimgeour
06-10-2009, 01:39 AM
I have a spreadsheet which uses VBA to connect to a Database. Data is then extracted into the spreadsheet.

The problem is that if more than 15 rows of data is extracted and put into my spreadsheet, it doesnt fit into the spreadsheets formatting correctly.

Is there any way I can code it so that it will allow for more rows of data coming in if needed?

HaHoBe
06-10-2009, 06:12 AM
Hi, cameron.scrimgeour,

as I know noting about your formatting you could use the name Database for the range currently used which should rely on the range neede (or create a name yourself based on Offset and the number of records by Count/CountA).

If you do it by VBA you could adjust the name after the import:
ActiveWorkbook.Names.Add Name:="myName", RefersToR1C1:= _
"=Sheet1!R1C1"

Ciao,
Holger