On the word 'Nothing' in the line 'If wb Is Not Nothing Then' I am getting an error:…
Jump to turn (8)
- 1On the word 'Nothing' in the line 'If wb Is Not Nothing Then' I am getting an er
- 2Is this code correct: Sub OpenDataAnalysis() ' OPEN ERVICE PROVIDERS ANALYSIS Di
- 3Is this correct: If Target.CountLarge > 1 Then Exit Sub If Target.Address = "$P$
- 4Error: Application defined or object defined error on the line 'Range("P23").Int
- 5I am still getting the application defined or object defined error.
- 6still getting the same error
- 7error is now Subscript out of range, on the same line
- 8Error: Object Varaible or With Block Variable not set, on the line 'rng.Interior
- User
On the word 'Nothing' in the line 'If wb Is Not Nothing Then' I am getting an error: Invalid use of Object. This is the full code: If Target.CountLarge > 1 Then Exit Sub If Target.Address = "23" Then ' Unlock Sheet Me.Unprotect Password:="edit" Target.Offset(0, 2).Value = Date Call OpenDataAnalysis Application.Wait (Now + TimeValue("0:00:04"))
'Dim wb As Workbook Dim wb As Object On Error Resume Next Set wb = Workbooks("Service Provider Analysis") On Error GoTo 0 If wb Is Not Nothing Then Target.Interior.ColorIndex = 6 ' Light blue Else ' Reset cell formatting if workbook is closed Range("P23").Interior.ColorIndex = xlNone ' No color Me.Protect Password:="edit" ' Lock Sheet End If
- Assistant