willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 888
- Office Version
- 365
- Platform
- Windows
Hello,
I have written the below code and have put in the word Cell Reference where I would like the code to refer to text in a particular cell, lets say: A3 from spreadsheet 'Criteria'.
Any help with incorporating a cell reference in the 4 mentioned places would be greatly appreciated.
Thank you very much!
I have written the below code and have put in the word Cell Reference where I would like the code to refer to text in a particular cell, lets say: A3 from spreadsheet 'Criteria'.
Any help with incorporating a cell reference in the 4 mentioned places would be greatly appreciated.
Thank you very much!
VBA Code:
Dim Msg As String, Ans As Variant, lr As Long, sh As Worksheet, lo As ListObject
Application.ScreenUpdating = False
If Application.CountIf(Sheets("Criteria").Range("A3:D3"), "") > 0 Then
MsgBox "Please Complete all Fields"
Exit Sub
End If
Msg = "The Report for Cell Reference will be run," & vbCrLf & "" & vbCrLf & " Do you wish to continue?"
Ans = MsgBox(Msg, vbYesNo)
Select Case Ans
Case vbYes
Workbooks.Open "X:\QUALITY\Quality Assurance\Cell Reference Reports for Audits.xlsx"
Windows("Cell Reference Reports for Audits.xlsx").Activate
Call Cell Reference
Case vbNo
GoTo Quit:
End Select
Quit:
End Sub