Problem in my macro....help please!
Posted by RoB on October 02, 2001 4:16 PM
The following is a small part of my macro. I have a workbook open, and i want it to be able to open the "Credit Log 2001.xls" file, and fill in the next blank cell with the data from "J8" on sheet "Prelim Info" on the first workbook i had open (CurrentbookName). The problem is with my syntax in the bold part in the following:
CurrentbookName = ActiveWorkbook.Name
Workbooks.Open Filename:="S:\Credit Log 2001.xls"
Dim r As Integer
r = 0
Do Until Cells(r + 1, 1).Value = ""
r = r + 1
Loop
ActiveCell = Workbooks("CurrentbookName").Worksheets("Prelim Info").Range("J8")
Whats wrong with this formula?
Thanks for any help in advance :)