View Full Version : Msgbox notification with paasword by vba macro
fixer
06-30-2020, 05:59 PM
Hi,
I am looking for a macro that will do the things mentioned below
when i run the macro it should create a msg box stating "upload the file" & that msgbox can only be closed by paasword & paasword will be 1234
without paasword that msgbox shouldn't be closed or disappear
So plz have a look & help me in solving this problem
Thnx in Advance
https://www.excelforum.com/excel-programming-vba-macros/1320450-msgbox-notification-with-paasword-by-vba-macro.html#post5356703
fixer
07-04-2020, 07:19 PM
Option Explicit
Sub ABC()
If TextBox1 = "" Then
MsgBox "PLEASE ENTER THE PASSWORD", vbInformation, ""
TextBox1.SetFocus
Exit Sub
ElseIf TextBox1 = "1234" Then
MsgBox "SUCCESSFUL"
Application.Visible = True
Unload Me
Else
MsgBox "THAT PASWWORD IS INCORRECT", vbInformation, ""
TextBox1 = ""
TextBox1.SetFocus
End If
End Sub
Sub CommandButton2_Click()
MsgBox "THIS CONTAINS YOUR CODE THAT UPLOADS THE FILE"
End Sub
Sub UserForm_Initialize()
Call SystemButtonSettings(Me, False)
End Sub
I got this
i need only 1 macro that will do the things
Logit
07-04-2020, 08:43 PM
.
You can't do that with a Message Box.
You will need to create a UserForm that looks like a Message Box and include the macro for the password.
fixer
07-04-2020, 08:57 PM
Yes I am looking for the same only
But I don't know how to do it Logit Sir
Logit
07-04-2020, 09:05 PM
.
How to create a UserForm : https://gregmaxey.com/word_tip_pages/custom_vba_msgbox.html
Create a Password User Form : https://www.youtube.com/watch?v=QhGiwgv0WZo
fixer
07-04-2020, 11:35 PM
I am unable to make it Logit Sir
Could u make it & provide it to me Sir
It will be a Great Help
fixer
07-06-2020, 11:18 PM
https://eileenslounge.com/viewtopic.php?f=30&t=34929
Problem Solved : https://eileenslounge.com/viewtopic.php?p=271231#p271231
Thnx Logit Sir
DocAElstein
07-07-2020, 12:56 PM
Avinash,
If you get an answer somewhere else, Then
Please always give the solution, ( and if you can, then explain it also )
Please always give a URL link to the solution
Please do this in all places that you cross post
You have already been asked to do that here and in other places. You still don’t always do it. It is your choice, - do what you want. But if I ever see that you do not do it anywhere ever again, then I will choose to Ban you here and also in some other places. Just my choice , that’s all
Alan
fixer
07-07-2020, 01:21 PM
Sure Sir
It will not be repeated
I am posting the solution here also
Sub Upload() ' https://eileenslounge.com/viewtopic.php?p=271231#p271231
Do
Loop Until InputBox(Prompt:="Enter password", Title:="Upload the file") = "1234"
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.