PDA

View Full Version : create moviedatabase, search IMDB.com



Ago
05-29-2008, 03:31 PM
im thinking of making a excelfile that will contain all movie that i have.

and to make it easy i want to be able to search on www.imdb.com (http://www.imdb.com) , select the movie and save it im my list.

this is all new to me, i dont have a clue how to do it.
i have been trying to read the other macros codes what they are doing, but i have a hard time understanding it.

can someone give me some pointers on how to start?

grichey
05-29-2008, 06:39 PM
The first macro I learned was turning my header row grey. The best thing to do if you want to get the basic idea of how excel and vba go together is just goto tools > macros > record new macro. Do a bunch of stuff (make some formulas, color some cells, delete some, etc) then go into the editor (alt + f11) and see if you can figure out what's going on line by line. Then come back to the forum and ask questions.

Ago
05-29-2008, 11:48 PM
oh sorry about that , i didnt make myself clear.

i know how to write macros, but using IE with VBA/Excel is new to me.
so what i meant was i need some basics in "VBA internet" functions.

lets say i want terminator 3, i would need Excel to show me the "popular titles" on http://www.imdb.com/find?s=all&q=Terminator+3
and from there i should be able to choose which is the correct.
how do i get Excel/VBA to get that information?

Charlize
05-30-2008, 05:14 AM
To find info for a certain movie you could try this. This will open your browser with a searchresult from imdb.Sub go_to()
Dim vFindit As String
vFindit = Application.InputBox("Give movietitle ...", "Search movietitles ...", Type:=2)
vFindit = Replace(vFindit, " ", "+")
ActiveWorkbook.FollowHyperlink Address:="http://www.imdb.com/find?s=all&q=" & vFindit, _
NewWindow:=True
End SubCharlize

ps. Look for some posts of Norie if you want some more ideas to manipulate webpages.

Ago
05-31-2008, 10:21 AM
thanks a lot!
now i know how to connect excel to the webpage.
anyone knows how to sort out the usefull bits on the webpage?

i would guess i have to use the source on the website, anyone knows how to import it in to a cell or a variable?

i searched for Norie, but he has written over 1100 posts. thats alot to read.
i tried searching with keywords but no luck.

grichey
06-02-2008, 06:29 AM
Yea I tried to search the norie suggestion but came up with nothing myself too. There's a thread that concerns pulling a table. Search 'Pause Macro'