Forum

VBA not able to get...
 
Notifications
Clear all

VBA not able to get data from website

7 Posts
2 Users
0 Reactions
81 Views
(@vinod79)
Posts: 4
Active Member
Topic starter
 

Hi Mynda Treacy,

I have office 2019 get free from new laptop on 2 march, in Excel I have to done some office work in VBA macro, but it does not pull data from website, I have another laptop that file is working in other laptop with unpaid Office 2010 but processor of that laptop is slow that why i have to purchaser new one, The very first day that file is doing well then someone suggest me to active micro security in developer tab and make a drive now that file is not working, I makes new macro and reinstall office 2019, but it does not working, I put same inquiry in Microsoft Forum on 9 April and try to contact but as there is a lock-down in New Delhi and all India so not get any help from them. I am attaching one of files as now I am using Office 2010 so it not possible make upload screenshots again. Please give me some direction to solve this quarry as soon as possible as I have to work from home with non assistance IT person since I am not trained on it.

Vinod Bangar

 
Posted : 02/05/2020 3:33 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vinod,

I can see that you are trying to get something from the NSE website but I don't know exactly what it is you are trying to do.

Please give a clear description of the problem and the result you are looking for.

regards

Phil

 
Posted : 02/05/2020 5:19 am
(@vinod79)
Posts: 4
Active Member
Topic starter
 

Dear Phil,

I have a make a Macro-Enabled workbook, it pull daily live and close market Future data from the website. this file is working in Office 2010 unpaid or Office without keys, but the same file is not working in Office 2019 which I get free of cost with new laptop as Office 2019 is paid in India, I want to that how I can use the same file in the Office 2019 Excel as this file does not pull data from the website after click the button it make system hang and I have to close this file by Esc key or Task Manager. As their are some advance features in Excel 2019 but not in office 2010 so I want to use that features.

Thanks & regards

Vinod Bangar

 
Posted : 02/05/2020 8:12 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vinod,

When I try to run your code it takes forever 'Contacting the server ...' and I eventually stopped the query.

I wrote a new web query and ran that and also took forever but by repeatedly pressing Esc to cancel the query (or at least stop the current step in the query) the data from NSE was eventually loaded.

I tried using Power Query just to see how that performed and it also took several minutes just sitting there 'Connecting'.

I loaded the URL into my browser and it too had issues loading the site.  Sometimes it worked,sometimes it did not.

Looking at the browser debugging tools I can see that the NSE website generates a few 500 Internal Server Errors - this is not good.  It's also generating JavaScript errors to uncaught references.

These errors don't indicate that the site is put together too well and such errors may be the cause of the slow loading time in Excel.  Perhaps older versions of Excel were more forgiving of such website errors but 2019 doesn't seem to like them.

I can load other sites without issue so the problem does appear to be the NSE site itself.

Phil

 
Posted : 02/05/2020 9:33 pm
(@vinod79)
Posts: 4
Active Member
Topic starter
 

Dear Phil,

Thanks, you have taken your precious time for me.

Regards

Vinod Bangar

 
Posted : 02/05/2020 10:49 pm
(@vinod79)
Posts: 4
Active Member
Topic starter
 

Dear Phil,

Can I Install both MS Office, Office 2010 and Office 2019 scientifically, using Office 2010 for Data pulling from Macro Run and stored that data in Excel 2019 sheet. If Possible what is the process.

Regards,

Vinod Bangar

 
Posted : 05/05/2020 9:30 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Vinod,

It's possible to install multiple versions of Office together, at least it used to be, but I've not done it with 2019.

You can get issues with the different versions overwriting various files on each other, and Outlook may not work properly.

You might be better off with another approach, like using Python to get the data you want or using a 3rd party program to sit between VBA and the website - like Selenium.

These posts will get you started with these methods

https://www.myonlinetraininghub.com/web-scraping-filling-forms

https://www.myonlinetraininghub.com/real-time-data-excel

https://www.myonlinetraininghub.com/real-time-data-excel-using-sockets  

Regards

Phil

 
Posted : 05/05/2020 10:25 pm
Share: