M
meggie
Hi,
I am realativley new user of VBA and am having trouble getting cells on one
page equal to the particular cells in the other page. I previosuly had the
code set up for cells on the same page equaling each other and the code was
running fine. I now get a Run time Error '9':sbscript out of range I have
checked and made sure that the page name is correct however am still getting
this error. Any help would be fantastic
Sub herdparameters()
For i = 1 To 20
Sheets("With hmodel")(8, 3).Value = Sheets("With herd").Select(46 + i,
3).Value
Sheets("With hmodel")(12, 3).Value = Sheets("With herd")(46 + i, 23).Value
Sheets("with hmodel")(13, 3).Value = Sheets("with herd")(46 + i, 29).Value
Sheets("with hmodel")(11, 6).Value = Sheets("with herd")(46 + i, 15).Value
Sheets("with hmodel")(12, 6).Value = Sheets("with herd")(46 + i, 10).Value
Calculate
Next
End Sub
I am realativley new user of VBA and am having trouble getting cells on one
page equal to the particular cells in the other page. I previosuly had the
code set up for cells on the same page equaling each other and the code was
running fine. I now get a Run time Error '9':sbscript out of range I have
checked and made sure that the page name is correct however am still getting
this error. Any help would be fantastic
Sub herdparameters()
For i = 1 To 20
Sheets("With hmodel")(8, 3).Value = Sheets("With herd").Select(46 + i,
3).Value
Sheets("With hmodel")(12, 3).Value = Sheets("With herd")(46 + i, 23).Value
Sheets("with hmodel")(13, 3).Value = Sheets("with herd")(46 + i, 29).Value
Sheets("with hmodel")(11, 6).Value = Sheets("with herd")(46 + i, 15).Value
Sheets("with hmodel")(12, 6).Value = Sheets("with herd")(46 + i, 10).Value
Calculate
Next
End Sub