Groups | Search | Server Info | Login | Register
| Newsgroups | comp.sources.d |
|---|---|
| Date | 2015-07-03 04:11 -0700 |
| Message-ID | <18d38bdd-bc1e-43d3-a08b-beb5ebd882c5@googlegroups.com> (permalink) |
| Subject | WORD macro that spits out a copy-pastable message box |
| From | sandeep6699@yahoo.com |
Hello netizens,
I am very new to VBA. I would like to have a macro that prompts a user for a movie release year and then spits out the IMDB query URL, which will gave the highest rated movies in that year, with user rating between 6.9 and 10. I have taken a stab at the script, but it looks funny because I use the InputBox to spit out the URL. Naturally I first used MsgBox, but I could not copy-and-paste the output message in the box.
Kindly help.
Regards,
Sandeep
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Sub IMDB()
'
' Create IMDB query to retrieve the highest rated movies in a user-selected year, with user
' rating between 6.9 and 10
'
'
Dim sText As String
Do
sText = InputBox("Enter movie release year")
If (sText = vbNullString) Then Exit Sub
sText = InputBox("", "Copy and paste the URL in the form below", "http://www.imdb.com/search/title?at=0&languages=en%7C1&release_date=" + sText + "-01-01," + sText + "-12-31&sort=user_rating&title_type=feature&user_rating=6.9,10")
Loop Until sText = vbNullString
End Sub
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Back to comp.sources.d | Previous | Next — Next in thread | Find similar
WORD macro that spits out a copy-pastable message box sandeep6699@yahoo.com - 2015-07-03 04:11 -0700 Re: WORD macro that spits out a copy-pastable message box sandeep6699@yahoo.com - 2015-08-02 23:36 -0700
csiph-web