help transporting data to another wkb

  • Thread starter Thread starter nrage21
  • Start date Start date
N

nrage21

So far this board is 11 for 12 when it comes to helping me... I am ver
thankful for this. I have yet another obstacle in my path though. Thi
was brought up by several of my co-workers, and as usual they dumped i
on my lap, as if my backlog wasnt big enough already... Anyhow...

Here is the situation...
I have 14 workbooks... wkb1 tru wkb14

wkb1 tru wkb13 has several sheets where people set appointments
Appointments are entered in rows (i.e. Row 7... range would be C7:J7
that's where the info will be entered. Row 11... range would b
C11:J11... you get the point.)

At the end of each row I have placed a commandbutton with the followin
code:

'... example for row 7 this checks that all cells in range C7truJ7 hav
been filled and then saves workbook
Private Sub CmBUP1_900_1_Click()
If Application.WorksheetFunction.CountA(Range("C7:J7")) < _
Range("C7:J7").Cells.Count Then
MsgBox "Unable to book! Complete ALL Fields"
Else
ActiveWorkbook.Save
End If
End Sub

What I need help, is in the following...
I want to add code in these commandbuttons that when the wkb is save
then it takes the info in that row and transports that data int
wkb14's last empty row.... making a list in wkb14.

Any1 has any idea in how to accomplish this? or is there a better way?

TIA
- Larry -
VBA Amateu
 
This is what I got so far, and it's ugly... cant get it to work cause
suck in VBA :)... hoping some1 will help me.

Private Sub CommandButton1_Click()
Dim LastRow As Long

'...checks that range E7:J7 is all filled with data
If Application.WorksheetFunction.CountA(Range("E7:J7")) < _
Range("E7:J7").Cells.Count Then
MsgBox "Complete ALL Fields"
'...if everything ok then copies row, open wkb14 and tries pastin
values in last empty row
Else
Range("C7:J7").Select
Selection.Copy
Workbooks.Open Filename:= _
("C:\Docs\wkb14.xls")
LastRow = Worksheets.Range("A65536").End(xlUp).Row + 1
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False

End If
End Sub

can any1 help? PLEASE!!

TIA
- Larry -
VBA Amateu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top