B
Burlone Ubriaco via AccessMonster.com
Hello AccessMonster,
I have Access setting up/formatting a spreadsheet it's exporting. I'm trying
to have a column autofill with the value "N" until the same row in column A
is null. The code below is giving me a "Script out of range" error. Any
help will be greatly appreciated. Thanks.
Dim SourceRange As Excel.Range
Dim fillRange As Excel.Range
Dim rng4 As Excel.Range
With Worksheets("shtXL")
Set rng4 = .Cells(.Rows.Count, 1).End(xlUp)
If rng4.Row < 1 Then
Exit Sub
Else
Set SourceRange = .Range("AU8")
SourceRange.Value = "N"
Set fillRange = .Range(SourceRange, .Cells(rng4.Row, "AU"))
SourceRange.AutoFill Destination:=fillRange, Type:=xlFillValues
End If
End With
I have Access setting up/formatting a spreadsheet it's exporting. I'm trying
to have a column autofill with the value "N" until the same row in column A
is null. The code below is giving me a "Script out of range" error. Any
help will be greatly appreciated. Thanks.
Dim SourceRange As Excel.Range
Dim fillRange As Excel.Range
Dim rng4 As Excel.Range
With Worksheets("shtXL")
Set rng4 = .Cells(.Rows.Count, 1).End(xlUp)
If rng4.Row < 1 Then
Exit Sub
Else
Set SourceRange = .Range("AU8")
SourceRange.Value = "N"
Set fillRange = .Range(SourceRange, .Cells(rng4.Row, "AU"))
SourceRange.AutoFill Destination:=fillRange, Type:=xlFillValues
End If
End With