Ok I'll show you the code I have so far:
Option Explicit
Private Sub CommandButton1_Click()
Dim rng1 As Range
Dim rngFound As Range
With Worksheets("Index")
Set rng1 = .Range("A1:A" & .Range("A65536").End(xlDown).Row)
End With
Set rngFound = rng1.Find(what:=DateValue(Me.TextBox1.Value))
Workbooks.Open Filename:="C:\Documents and
Settings\jermaine_wanyou\Desktop\Test_Adagio\CI-Adagio-History-Web.xls"
Range(rngFound, rngFound.Offset(1, 8)).Copy
Workbooks("CI-Adagio-History-Web.xls").Worksheets("Sheet1").Range("A3114")
Set rngFound = Nothing
Unload Me
End
End Sub
Within the Range section that says "Range A3114", I would like it to check
to see if there is any blank cells or rows after the previous data. If there
isn't then paste the data in the empty cell, if there is data it should tell
me that there is, I was thinking about an If statement but I don't know how
to incorporate it within the code I have
> You didn't give much to go on regarding your needs or how you envision
> accomplishing this.
[quoted text clipped - 12 lines]
> > probably from the internet or from a database, I want this workbook to update
> > from another workbook, can anyone help me with this please?
XP - 15 Jan 2008 21:29 GMT
If you mean you just want to locate the next available cell to paste the data
into safely, without overwriting anything try:
Range("A65536").End(xlUp).Offset(1, 0).Select
<your paste code here>
This should work unless there is danger that the entire spreadsheet is
filled down to row 65536.
HTH
> Ok I'll show you the code I have so far:
>
[quoted text clipped - 40 lines]
> > > probably from the internet or from a database, I want this workbook to update
> > > from another workbook, can anyone help me with this please?