Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
I have an input sheet that allows a user to fill in various time information
In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
Maybe this page will help
http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Oldjay" wrote in message ... I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
Thanks Helped alot
"Oldjay" wrote: I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
I spoke too soon - Here is what I have got .I get a compile error on "Last row"
Sub or Function not defined Ron ??? Sub copy_6_Values_PasteSpecial() Dim destrange As Range Range("AC151:AO151").Copy If Selection.Areas.Count 1 Then Exit Sub Application.ScreenUpdating = False Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Selection.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub "Oldjay" wrote: Thanks Helped alot "Oldjay" wrote: I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
Hi Oldjay
Copy the LastRow function from my site also in the module -- Regards Ron de Bruin http://www.rondebruin.nl "Oldjay" wrote in message ... I spoke too soon - Here is what I have got .I get a compile error on "Last row" Sub or Function not defined Ron ??? Sub copy_6_Values_PasteSpecial() Dim destrange As Range Range("AC151:AO151").Copy If Selection.Areas.Count 1 Then Exit Sub Application.ScreenUpdating = False Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Selection.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub "Oldjay" wrote: Thanks Helped alot "Oldjay" wrote: I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
This is wrong
Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Use it like this to copy in the first empty row in Column A Set destrange = Sheets("Records").Range("A" & _ LastRow(Sheets("Records")) + 1) See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Oldjay" wrote in message ... I spoke too soon - Here is what I have got .I get a compile error on "Last row" Sub or Function not defined Ron ??? Sub copy_6_Values_PasteSpecial() Dim destrange As Range Range("AC151:AO151").Copy If Selection.Areas.Count 1 Then Exit Sub Application.ScreenUpdating = False Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Selection.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub "Oldjay" wrote: Thanks Helped alot "Oldjay" wrote: I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Database operation
Sorry to be so dumb but I can't find the LastRow function on your site
"Ron de Bruin" wrote: This is wrong Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Use it like this to copy in the first empty row in Column A Set destrange = Sheets("Records").Range("A" & _ LastRow(Sheets("Records")) + 1) See http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Oldjay" wrote in message ... I spoke too soon - Here is what I have got .I get a compile error on "Last row" Sub or Function not defined Ron ??? Sub copy_6_Values_PasteSpecial() Dim destrange As Range Range("AC151:AO151").Copy If Selection.Areas.Count 1 Then Exit Sub Application.ScreenUpdating = False Set destrange = Sheets("Records").Range("PT_Data" & LastRow(Sheets("Records")) + 1) Selection.Copy destrange.PasteSpecial xlPasteValues, , False, False Application.CutCopyMode = False Application.ScreenUpdating = True End Sub "Oldjay" wrote: Thanks Helped alot "Oldjay" wrote: I have an input sheet that allows a user to fill in various time information In this same sheet I have a row that has all the headings I want to to save in a database. In the next row I have the formulas that references the input cells I have another sheet that I want to saves a record for each day. It has all the above headings Is there a macro that will copy the record to the database and have it included in the database range? oldjay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update Excel Database via Access Main Database with a script | New Users to Excel | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Moved database, how do I change link to the database in excel | Excel Discussion (Misc queries) | |||
Using Excel as a database and need macro or vba to take data entered on one tab and update the database by adding to the next avail row | Excel Programming | |||
what does $ operation mean | New Users to Excel |