Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking Macro if fields are emply to not prompt - problem 1

Status
Not open for further replies.

YNOTU

Technical User
Jun 21, 2002
749
US
hello all, I have this code but can't find what line is not working.

Code:
Private Sub Workbook_Open()
If [C1].Value <> "" And [C2].Value <> "" And [K2].Value <> "" And [C4].Value <> "" And [J6].Value <> "" And [H7].Value <> "" Then Exit Sub
Dim Client As String, Project As String, Job As String, ClientID As String, AccountManager As String, DataTechnician As String, ProductSize As String
Client = Application.InputBox(Prompt, "Client Name :")
Project = Application.InputBox(Prompt, "Project :")
Job = Application.InputBox(Prompt, "Job Number :")
ClientID = Application.InputBox(Promt, "Client ID :")
AccountManager = Application.InputBox(Prompt, "Account Manager :")
DataTechnician = Application.InputBox(Prompt, "Data Technician :")
ProductSize = Application.InputBox(Prompt, "Product Size :")

Range("C1").Value = Client
Range("C2").Value = Project
Range("K2").Value = Job
Range("K3").Value = ClientID
Range("C4").Value = AccountManager
Range("J4").Value = DataTechnician
Range("H7").Value = ProductSize


End Sub

One this worksheet is filled by the user and opened again, it should not prompt you to input but this sheet does no matter what is typed then saved.

Why don't I see it??

Thanks
 
You test J6 but don't fill it if empty.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top