Hello, I am struggling to finish off this macro that adds an "Open Status" Next to all NEW lines of data. Because the column has a bunch of blank values, I cant use End(xlUp) because it won't line up with new data added.
Essentially, all I am attempting to figure out is where I am going wrong when including variables In my range selection. Here is my code;
The Rng.Select Line is where its failing. I pulled that part of the code directly from code I found here in this forum that was reported as working, So I can seem to figure out where I went wrong.
"Select Method of Range Class" is the error VBA is giving me.
If this is of any help, heres a very dumbed down version of what im attemping to do.
Essentially, all I am attempting to figure out is where I am going wrong when including variables In my range selection. Here is my code;
VBA Code:
Sub movenewposdb()
'
' movenewposdb Macro
'
' ``Filter New Orders
Sheets("Test Ship Report").Activate
Sheets("Test Ship Report").Range("$A$1:$K$1000").AutoFilter Field:=11, Criteria1:="#N/A"
''Set Variables
Dim LR As Long
Dim DBLR As Long
Dim ws As Worksheet
Dim ALLws As Worksheet
Dim Rng As Range
Set ws = Worksheets("Test Ship Report")
Set ALLws = Worksheets("ALL Orders Database")
DBLR = Sheets("ALL Orders Database").Cells(Rows.Count, 3).End(xlUp).Offset(1).Row
LR = ws.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
Set Rng = ALLws.Cells(DBLR, 2).Resize(LR)
Rng.Select
Selection.Value = "Open"
End Sub
"Select Method of Range Class" is the error VBA is giving me.
If this is of any help, heres a very dumbed down version of what im attemping to do.