Hello
This is my first day using VBA. I have searched the web and tried to come up with a single usable answer for my query. I am running Excel 2007 on an XP machine.
I am trying to produce a large data input from a third part website, and am working through it stages - this one has got me. My code is attached.
I am trying to move the cursor in the DestSheet down one in readiness for the next loop. I have tried several ways, with the latest being shown.
Any help woul dbe appreciated.
Thanks
GV
Sub UNITABInput()
Dim Count As Integer
Dim Races As Integer
Dim DestSheet As Worksheet
Dim SourceSheet As Worksheet
Set DestSheet = Worksheets("HTML Creator")
Set SourceSheet = ActiveSheet
Races = Worksheets("Race Details Entry").Range("C4").Value
For Count = 1 To Races
DestSheet.Range("A1") = " & Worksheets("Race Details Entry").Range("C17").Value & "/" & Worksheets("Race Details Entry").Range("D17").Value & "/" & Worksheets("Race Details Entry").Range("E17").Value & "/" & Count & ".html"
DestSheet.ActiveCell.Offset(1, 0).Select --> This is the problem
Count = Count + 1
Next Count
MsgBox Count - 1
End Sub
This is my first day using VBA. I have searched the web and tried to come up with a single usable answer for my query. I am running Excel 2007 on an XP machine.
I am trying to produce a large data input from a third part website, and am working through it stages - this one has got me. My code is attached.
I am trying to move the cursor in the DestSheet down one in readiness for the next loop. I have tried several ways, with the latest being shown.
Any help woul dbe appreciated.
Thanks
GV
Sub UNITABInput()
Dim Count As Integer
Dim Races As Integer
Dim DestSheet As Worksheet
Dim SourceSheet As Worksheet
Set DestSheet = Worksheets("HTML Creator")
Set SourceSheet = ActiveSheet
Races = Worksheets("Race Details Entry").Range("C4").Value
For Count = 1 To Races
DestSheet.Range("A1") = " & Worksheets("Race Details Entry").Range("C17").Value & "/" & Worksheets("Race Details Entry").Range("D17").Value & "/" & Worksheets("Race Details Entry").Range("E17").Value & "/" & Count & ".html"
DestSheet.ActiveCell.Offset(1, 0).Select --> This is the problem
Count = Count + 1
Next Count
MsgBox Count - 1
End Sub