Thanks.
I can run this code now, but It is not the Thing that I am looking for...
I am looking for a macro (EXCEL VBA code) which allow me to pull down the table on web into the Excel.
Would you please help me in this regard?
Thanks so much
Cheers

urgent - Nassa C replied to Panji Tengkorak on 10-Feb-09 09:14 PM

Daniel,
This code gives me the source code of the web page....
I am looking for the content of the web page which is a table.
Would you please help me in this subject?
Thanks
Nasim

re - Panji Tengkorak replied to Nassa C on 10-Feb-09 10:44 PM

First, the code I gave you is an EXCEL VBA Code, second what do you mean by "table" there? is it an HTML table or a database table?

urgent - Nassa C replied to Panji Tengkorak on 10-Feb-09 11:43 PM

It's a HTML table...you know what exactly it is....we have a http address, ok?, and there is a table in it(HTML table). I want to paste the data in HTML table into Excel. not by using Import, I want a macro for it.Thanks so much for your help....Nasim

Excel VBA - Nassa C replied to Panji Tengkorak on 10-Feb-09 11:49 PM

You are right the code that you gave me is an Excel VBA code and I run in on VBA, however it doesnt give me the thing that I am looking for. It creates the source code of the webpage and put it on C4. would you please tell me what that means?thanks

BUT IF you want to perform a further calculation using the value of your HTML table within your Excel environment, then you need to use the previous code I gave you before, grab the HTML source and parse it to be inserted into your worksheet cell. I haven't had time to do it since it's going to be a very complex one depending on the HTML structure of your HTML table. Keep watching, I will do it when I have time...

Do not forget to refer "Microsoft XML, version 2.0" and "Microsoft Forms 2.0 Object Library" into your Excel VBA project.

Microsoft Forms 2.0 Object Library is not likely found on the reference list so browse for it. CLick the browse button on the reference window then find "C:\WINDOWS\System32\FM20.DLL"

re - Nassa C replied to Panji Tengkorak on 11-Feb-09 08:31 AM

Thanks so much Panji...

This one is the thing that I am looking for...

By the way, would you please let me know what I can do with the previouse one to open the table in Excel, because as I told you before it shows HTML source code of the web page on one Cell nothing more.Should I do anything special?

Although little bit late in responding to your question, but try this one as well:Go to: Data | Import External Data | select New Web Query.Put your http address in relevant box and click go when it opened the site, click the import button.HTH

re - Nassa C replied to Rasoul Khoshravan on 12-Feb-09 08:02 AM

Thanks... I haev tried this before, but becasue my http address is too long it gives me error... I tries Panji's solution. It works but I want it for different sheets and it is just for one specific sheet.