ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Database record add (https://www.excelbanter.com/excel-programming/375016-database-record-add.html)

Oldjay

Database record add
 
I have the following macro that adds a record to the database "TimeRecords"

Application.Goto Reference:="Export_Data"
Selection.Copy
Application.Goto Reference:="PT_Data" 'first row of database
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate

Selection.PasteSpecial Paste:=xlValues

My problem is the database range does not expand to add this record

I do not want to use the user database form to add this record

oldjay

JLGWhiz

Database record add
 
You need to work an Autofit in there somewhere.

"Oldjay" wrote:

I have the following macro that adds a record to the database "TimeRecords"

Application.Goto Reference:="Export_Data"
Selection.Copy
Application.Goto Reference:="PT_Data" 'first row of database
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate

Selection.PasteSpecial Paste:=xlValues

My problem is the database range does not expand to add this record

I do not want to use the user database form to add this record

oldjay


Jim Cone

Database record add
 
See the reply to your post in the misc. group.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Oldjay"
wrote in message
I have the following macro that adds a record to the database "TimeRecords"
Application.Goto Reference:="Export_Data"
Selection.Copy
Application.Goto Reference:="PT_Data" 'first row of database
Selection.End(xlDown).Select
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate

Selection.PasteSpecial Paste:=xlValues
My problem is the database range does not expand to add this record
I do not want to use the user database form to add this record
oldjay


All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com