Excel VBA Introduction Part 11.2 - Application.InputBox

Excel VBA Introduction Part 11.2 - Application.InputBox

WiseOwlTutorials

10 лет назад

131,851 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

kapi bara
kapi bara - 26.04.2023 22:56

Absolutely stunning! Wow, you are a great teacher Andrew😊 kudos for your work. I will surely cover the entire vba series in the Channel.

Ответить
Qasim Awan
Qasim Awan - 10.04.2023 17:03

This is great! I found the arrays example to be quite challenging but I'm confident that I'll grasp the concept once I've watched the full arrays tutorial.

Ответить
Mohammad Ali
Mohammad Ali - 12.10.2021 08:39

Hi Andrew, when my macro reaches application.inputbox to select the range, the sheet gets greyed out (blank) and doesn't allow me to select a range. Plz help. I tried to put the code in the same workbook from I need to select the range and in another workbook as well.

Ответить
Nathanaël Mouckagni
Nathanaël Mouckagni - 07.07.2021 00:18

Hi, you have a good job ! I am a gaboneas and i did not write english weel but i've a problem with that : ¨Dim MyFormula as string¨ and when i execut this ¨FormulaCell.Formulalocal= MyFormula¨ my computer bugg because the result of the cells in sheet is a number or ¨MyFormula¨ is typing as String ! Can you explain to me that please ?

Ответить
Jo Hassan
Jo Hassan - 18.05.2020 23:22

Excellent!!! What I am liking about your videos, is that there are no example files that I can use, so it is forcing me to write my own code. this is good, because I am making mistakes when typing, then rather than look at YOUR code on the screen, I fix it myself. gives me great satisfaction. I also like how succinct it is, the demonstration is amazing. The simple example off how you did the offset grabbing the cells, then saying minus 1, clearly showed how that function works. I have watched hundreds of videos and nothing comes close to yours. Thankyou

Ответить
Jair Aceves Cardona
Jair Aceves Cardona - 07.05.2020 05:30

Hi! I've been wattching recently your videos. I love them and i think that im learning a lot. Well, i got a doubt. Im running the code almost exactly as you have but it returns me an error. I've been looking for what could the error be, but sincerly i couldn't detect it.This is the code:




Sub FormulaInputB()
Dim formula1 As String

formula1 = Application.InputBox(prompt:="Ingresar Formula", Type:=0)
Range("D2").FormulaLocal = formula1

End Sub





If you or someone else could help me, i would be very thankful. I love learning stuff like this, and quarantine became a great opportunity to learn more about anything! Thanks to everyone that could be reading this!

Ответить
Sayyad Tajammul
Sayyad Tajammul - 05.12.2019 14:43

Andrew, you are really a great teacher with a lovely voice and detailed explanation to the point...i love it

Ответить
Kurt Nowak
Kurt Nowak - 08.11.2019 19:10

Andrew, thank you so much for these great Excel VBA videos!! You are indeed a very brilliant teacher. I really appreciate your approach in explaining the why instead of only the how and the advantages of one approach over another. I've watched a lot of others and most of them are very "cook book" like. The way you build on your lessons is excellent and they can be referenced as stand alone lessons as well. One suggestion I have is to perhaps putting your agenda of each lesson in the description section so it can be more easily searched. Lesson 5 for instance has a good section on copy/paste at the end which I needed to refresh myself memory on, but couldn't remember which lesson I saw it on. Thanks so much again!!!

Ответить
Hazem Ali
Hazem Ali - 21.09.2019 16:44

how lovely Wise Owl

Ответить
Pedro Vieira
Pedro Vieira - 27.08.2019 18:55

Hello! I found Type: = 1 bad for criticizing the date entry (dd / mm / yyyy) because the alert about the invalid date is "This is not a number!" and it should be "This is not a date!". I used the normal InputBox inside a loop (Do While / Loop) and a logic test (If / Then / End If) to criticize the dates ... See below:

Sub DataAdmEntry()

     Dim DtAdm As String ' To accept any data

     Do While True ' Do it while it's true

         DtAdm = InputBox ("Enter Admission Date:")

If DtAdm = "" Then Exit Sub ' Cancel button has been chosen

         If IsDate (DtAdm) then Exit Do ' If it is a valid date

         Msgbox "This is not a valid date!", VbInformation + VbOkOnly, "Warning"


     Loop


Msgbox "Admission Date is " & DtAdm

End Sub

Ответить
Jiamin Liu
Jiamin Liu - 26.06.2019 19:56

Hi Andrew and everyone, why do I get run-time error '1004' for this line of code:
Range("B2").End(xlDown).Offset(1, 0).Value = FilmName

Ответить
Giuseppe Lacanna
Giuseppe Lacanna - 26.06.2019 13:46

You are fantastic! I haven't other words to describe you! Thank you very much.

Ответить
Yi Xing
Yi Xing - 17.06.2019 07:32

andrew marry me

Ответить
Sawirus J
Sawirus J - 18.02.2019 21:34

 At 12mins, under the topic of Validating the Application.InputBox, if you input a string for a number, you get an error message, but if you enter a negative number it doesn’t detect the error, so I added a bit of code to detect negative numbers.

FilmLength = Application.InputBox(Prompt:="Enter the length", Type:=1)
If FilmLength < 0 Then
MsgBox "You have entered an invalid number."
Exit Sub
End If
Further improvements can be done to this code, if the length of film should be within a certain range(e.g. 120 to 240 mins.)

Ответить
Ben Linford
Ben Linford - 21.12.2018 11:35

Looks like you've created something along the lines of a VBA Masterclass in this playlist.
Huge, huge thanks.

Ответить
Aditya Rajan
Aditya Rajan - 07.10.2018 14:30

Hey Andrew, in the ApplicationInputbox where type=1 a person can seem to get away with typing a number instead of Date is there any way to prevent that?

Ответить
Harsh Agarwal
Harsh Agarwal - 06.05.2018 11:27

what the fuck. twilight saga genre is awful. lmao🤣🤣🤣🤣🤣🤣

Ответить
Joaquín Carmona
Joaquín Carmona - 23.04.2018 09:15

Very useful! Thank you for your time and sharing the knowledge. Greetings from Mexico.

Ответить
Zula Jenkins
Zula Jenkins - 21.03.2018 12:28

I have an issue with return array part that is resultrange.offset seems does not work on my VBA.

Ответить
Sumit Sarkar
Sumit Sarkar - 16.03.2018 15:53

Hello Sir
I'm having a problem, at 23 min the program you're using, I'm not able to switch to the excel sheet when I press F5, the input box comes above the vba screen not to excel, please help

Ответить
Dennis Yeadon
Dennis Yeadon - 24.02.2018 01:09

A super tutorial.

Ответить
priyanka ratnakar
priyanka ratnakar - 03.02.2018 06:25

"Range("A2").End(xlDown).Offset(1, 0).Value = Film_Name.This statement is showing an Application defined or object defined error.Can you please help

Ответить
Dominick D'Ambra
Dominick D'Ambra - 01.12.2017 17:27

Andrew how do you handle a user who OK's a range where the input box is empty?

Ответить
Tamer Aziz
Tamer Aziz - 28.11.2017 15:29

Very good material - Thank you Andrew.

Ответить
Amr gaber
Amr gaber - 29.10.2017 12:01

thanks
شكرا

Ответить
Zubair Kahn
Zubair Kahn - 14.10.2017 01:30

Hi Andrew, I recently started watching your videos about VBA. You can't imagine how happy I felt when I wrote my first VBA code and for that I am really thankful to you. I have two short questions. How can I make an interactively chosen cell (using Application.Inputbox) as an active cell? Second: I want to select (and copy) a dynamic range of cells, dates for example (in a single column) using End(xlDown) but I don't want to select the last row. How can I do that? I tried multiple things but no success :(

Ответить
Nel Sirc
Nel Sirc - 28.09.2017 13:51

thanks for making all these useful videos. though im a novice i learned a lot of codes. keep it up.. :)

Ответить
N Vignesh
N Vignesh - 21.05.2017 16:07

I need application.maillogon and maillogout function

Ответить
lydia lu
lydia lu - 19.05.2017 21:28

Hey Andrew
i have a question. I don't understand this loop "For loopcounter = LBound(filmlengths, 1) To UBound(filmlengths, 1)". What's this for? Every time I run it, it shows 'Sub or function not defined". Also, I tried to use "_" to transfer my loop to next line, but it failed and it stopping me writing anything.
really appreciate your tutorial. it's awesome.

Ответить
Richard Swartz
Richard Swartz - 29.04.2017 06:04

What is the difference between Application.InputBox and ApplicationInputBox (no period)? It came up in the Intellisense. Does it do the same thing?

Ответить
Manrajan Kalimuthu
Manrajan Kalimuthu - 24.04.2017 06:48

Thank you very much

Ответить
Warraq
Warraq - 11.03.2017 21:24

Andy, there are thousands of movies out there other than gravity ..

Ответить
Obed Leyva
Obed Leyva - 07.03.2017 08:43

Thank you so much Adrew, your're such a great person for share all these knowledge with all of us.

Ответить
JORGE PADRON
JORGE PADRON - 16.12.2016 04:31

Great one ..!

Ответить
Andrew Francis
Andrew Francis - 04.12.2016 15:16

Hello, just wanted to ask you why you use UBound to set the start of the loop counter? I tried just using the number 1 (isn't it always the first element?) and UBound and it seemed to work alright.
Whatever the case I think your tutorials are the best free VBA tutorials I've seen anywhere, lots of people are very grateful to you for sharing your expertise so generously.

Ответить
professional80
professional80 - 02.11.2016 22:26

HAHaha! Was I the only one who noticed the GENRE for Twilight??
Hobbit Genre = Fantasy
Twilight Genre = AWFUL←
SpiderMan Genre = Action
This is a fantastic video. Your lectures are impressive. ¡Thank you!

Ответить
Beena Gore
Beena Gore - 27.09.2016 10:36

Awesome video... to good explanation

Ответить
lester chua
lester chua - 12.09.2016 11:34

Sir I have a question. How come for the formulas we use Strings instead of Integers?

Ответить
Search4Knowledge
Search4Knowledge - 27.08.2016 15:12

If I use the application inputbox and define the type as 0, I see in the local formula "=R3C4+R4C4" (for cells D3+D4) and it gives an error upon running.

If I delete the type as 0, then it just works. Does anyone have an idea why?

Ответить
Hao-Chiang Cheng
Hao-Chiang Cheng - 16.06.2016 04:43

Hi Andrew,
In this session, I noticed that when the code contains "Application.Inputbox", the window does not switch to Excel sheet automatically whenever I run it. So I need to manually go to excel sheet page(in which I need to select cells, destination...) Do you know how to configure it?

Ответить
flydipdrop
flydipdrop - 16.04.2016 20:55

Great Video! Thx V.Much!

Ответить
Alex Verhoeven
Alex Verhoeven - 07.04.2016 00:11

Let me begin by thanking you for the great tutorials.
second i run into a problem when i run the "Enter a formula"sub.
When i run it, i get the inputbox. but after i have enter the formula (in my case =$D$16+$D$17) i get error code 1004. when press the debug i see that my formula has a value of =R19C4+R17C4. I cant find the problem, hope you can help me.

Ответить