Workbook Visibility

ewalks

New Member
Joined
Nov 25, 2018
Messages
2
Hello all:

I am creating a VBA workbook with UserForm to allow users to input data. I do not want the workbook to be visible to the user and have used "application visible=false" code. Everything appears to be working just as I want, however, I do not want to add a button/code the userform to allow visibility of the workbook (this is the only option I was able to find). The idea is that as the developer, I would like to be the only one to have access to the updated workbook. Is there a way for me to do this without making the workbook invisible to me as well? In my test runs, I have had to disable macros to view updates to the workbook. Thanks in advance!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
.
Here is part of a macro that makes the workbook visible. The command button is located on the user form.

Code:
Private Sub CommandButton3_Click()
    TextBox1.Text = ""
    TextBox2.Text = ""
    TextBox3.Text = ""
    UserForm1.Hide
    Application.ScreenUpdating = False
    ThisWorkbook.Application.Visible = True
    ThisWorkbook.Application.WindowState = xlNormal
    Application.ScreenUpdating = True
    UserForm1.Show vbModeless
    Me.TextBox1.SetFocus
End Sub

Obviously, the macro performs other functions as well.

You could make a password window (Inputbox) appear when you click the button, and if the password is correct the workbook is make visible. If the password is incorrect,
you could choose for the workbook to close completely or return the user to the Inputbox again for a second try at the password. There are a number of different options
you can take.

Here is a link to download the project containing the above macro : https://www.amazon.com/clouddrive/share/w3E0yxqHHd0HbFblRLbh9VqwKpjRL0nUzI6XgnlE1s7
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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