Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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
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
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
database query not showing foxpro database How I import data mangat New Users to Excel 1 June 24th 07 03:31 PM
Moved database, how do I change link to the database in excel Toastrack Excel Discussion (Misc queries) 0 October 20th 06 09:36 AM
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 rjr Excel Programming 5 June 11th 06 09:43 PM
what does $ operation mean JO New Users to Excel 1 December 15th 05 11:42 PM


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

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

About Us

"It's about Microsoft Excel"