Results 1 to 9 of 9

Thread: Msgbox notification with paasword by vba macro

  1. #1
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0

    Msgbox notification with paasword by vba macro

    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-pro...ml#post5356703

  2. #2
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Code:
    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

  3. #3
    Junior Member
    Join Date
    Feb 2017
    Posts
    8
    Rep Power
    0
    .
    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.

  4. #4
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Yes I am looking for the same only
    But I don't know how to do it Logit Sir

  5. #5
    Junior Member
    Join Date
    Feb 2017
    Posts
    8
    Rep Power
    0

  6. #6
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    I am unable to make it Logit Sir
    Could u make it & provide it to me Sir
    It will be a Great Help

  7. #7
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Last edited by DocAElstein; 07-08-2020 at 01:26 AM.

  8. #8
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,439
    Rep Power
    10
    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
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

  9. #9
    Senior Member
    Join Date
    Jul 2019
    Posts
    382
    Rep Power
    0
    Sure Sir
    It will not be repeated
    I am posting the solution here also

    Code:
    Sub Upload()  '   https://eileenslounge.com/viewtopic.php?p=271231#p271231
        Do
        Loop Until InputBox(Prompt:="Enter password", Title:="Upload the file") = "1234"
    End Sub
    Last edited by DocAElstein; 07-08-2020 at 01:22 AM.

Similar Threads

  1. VBA Macro to open a file and extract data
    By jeremiah_j2k in forum Excel Help
    Replies: 0
    Last Post: 05-22-2017, 03:17 PM
  2. Excel VBA/Macro Help required URGENT
    By shushom in forum Excel Help
    Replies: 6
    Last Post: 09-20-2016, 11:24 PM
  3. VBA Macro for Bulks and an attachment
    By UsmanKhalid in forum Excel Help
    Replies: 1
    Last Post: 01-27-2014, 12:13 PM
  4. SQL output from Excel VBA macro
    By goldenbutter in forum Excel Help
    Replies: 3
    Last Post: 05-07-2013, 08:07 PM
  5. Replies: 11
    Last Post: 11-10-2011, 12:32 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •