ghostbroker2
Board Regular
- Joined
- Feb 13, 2017
- Messages
- 58
here is the dropbox link for the 2 spreadsheets:
Dropbox - Rewinder Tracking
Debug highlights Line 17; .Value = .Value + Range("F5").Value
Here is the VBA:
Sub macSubmitProduction()
Dim W As Workbook
Dim C As Range
Dim lngR As Long
Set W = Application.Workbooks.Open("\\RWCAD\Rewinding Schedule\PRODUCTION REPORTS\REWINDER TRACKING\Rewinder Tracking TEST.xlsx")
Set C = W.Sheets(1).Cells.Find(Range("K1").Value)
If C Is Nothing Then
MsgBox Range("K1").Value & " Was Not Found!"
Exit Sub
End If
lngR = C.Row
With W.Sheets(1).Cells(lngR, "G")
.Value = .Value + Range("F5").Value
End With
With W.Sheets(1).Cells(lngR, "E")
.Value = .Value + Range("F3").Value
End With
With W.Sheets(1).Cells(lngR, "D")
.Value = .Value + Range("T1").Value
End With
W.Close True
Call macClean
End Sub
I'm still new to VBA, so any direction is appreciated.
Thank you
Dropbox - Rewinder Tracking
Debug highlights Line 17; .Value = .Value + Range("F5").Value
Here is the VBA:
Sub macSubmitProduction()
Dim W As Workbook
Dim C As Range
Dim lngR As Long
Set W = Application.Workbooks.Open("\\RWCAD\Rewinding Schedule\PRODUCTION REPORTS\REWINDER TRACKING\Rewinder Tracking TEST.xlsx")
Set C = W.Sheets(1).Cells.Find(Range("K1").Value)
If C Is Nothing Then
MsgBox Range("K1").Value & " Was Not Found!"
Exit Sub
End If
lngR = C.Row
With W.Sheets(1).Cells(lngR, "G")
.Value = .Value + Range("F5").Value
End With
With W.Sheets(1).Cells(lngR, "E")
.Value = .Value + Range("F3").Value
End With
With W.Sheets(1).Cells(lngR, "D")
.Value = .Value + Range("T1").Value
End With
W.Close True
Call macClean
End Sub
I'm still new to VBA, so any direction is appreciated.
Thank you