Excel VBA InputBox Cancel - Code Included

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 14

  • @moisestatis5418
    @moisestatis5418 Рік тому

    Excellent video, thanks for making it. Simple but very helpful!

  • @floscar
    @floscar Рік тому

    Thanks for the help, I found that a Do Loop works great even in handling a Cancel
    input=inputbox "Enter Somthing"
    Do while input =""
    input=inputbox "Enter Something"
    Loop

  • @缺口-q2z
    @缺口-q2z 3 роки тому

    but it doesn't work when the inputbox type is 8.

  • @manishreddy4242
    @manishreddy4242 2 роки тому

    Whatif my inputbox is of type integer this isn't working

  • @heglem
    @heglem 3 роки тому +1

    Great Video! Very concise .....Congrats

  • @coolag74
    @coolag74 5 років тому

    I have data in a sheet 1 under these headings. No., Name, Address, Mobile, Class, Section and so on...
    I created a button for "Search". When I click this button it asks through input box "Enter a number", when I enter a number it will search from that sheet and give the result in sheet 2. I use sheet 2 as a user form and these data will come in the specified cells. Like I want No. in A1, Name in B2, Mobile in B4, Class in C2, Section in C3 and so on...
    How can I write the code for the input box to search the result from sheet 1 and give the result in sheet 2...

  • @gelucu1546
    @gelucu1546 5 років тому

    Hello. I have written this code as a part of a larger code
    Dim myData1 As Date

    myData1 = InputBox("Introduceti data alimentarii / in format LUNA-ZI", "DATA ALIMENTARE", Date)
    ActiveCell.Value = myData1
    This code brings to a specified cell the value from InputBox (myData1).
    Now i tried to activate the cancel button in the way you have presented in the video but unfortunately I did`t succeed. After I tried the code from you I have written this code by my own but still generate bugs.
    Dim myData1 As Date

    myData1 = InputBox("Introduceti data alimentarii / in format LUNA-ZI", "DATA ALIMENTARE", Date)

    If myData1 = "" Then
    Exit Sub
    Else
    ActiveCell.Value = myData1
    End If
    If you can help me with this problem will be great. Thank you.

  • @sid12x12
    @sid12x12 7 років тому +1

    thx you helped me

  • @Wovi10
    @Wovi10 5 років тому +1

    Maybe try to speak to the lens in stead of the screen next to the lens. (You could try to just turn around that screen)

    • @malekhaddad5730
      @malekhaddad5730 5 років тому

      who would care which direction he's looking at -_- focus on the content if you wanna learn.