VBA If statement for User Form

Sandsawks

New Member
Joined
Apr 23, 2009
Messages
19
Okay so I assume that an If statement would be the best for what i need but if you have another type of code that will be fine.

Situation: I have a work sheet that as of right now i have a User form that opens when the worksheet is opened. The user form you place data in is copied to its respective cells when closed then my clients can request material and save the form and email it to my supervisor for processing. The thing is when my supervisor opens the form i dont want that user form to pop up since the clients already entered the data. He isnt exactly computer savy so i feel it will be a nusiance for him to have to cancel the user form every time. So can anyone help with a code that will basically say when i open this sheet display user form "HeaderInfo" If cell A5 is blank, and if the cell contains data do not display the user form.

Thank you in advance!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Like this?

Code:
Private Sub Workbook_Open()
    If Worksheets("Sheet1").Range("A5").Value = "" Then
        HeaderInfo.Show
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,399
Messages
6,119,279
Members
448,884
Latest member
chuffman431a

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top