craig.penny
Well-known Member
- Joined
- May 8, 2009
- Messages
- 656
Hello all,
I'm having problems trying to automate a process of downloading workbooks. What I do manually is that I open a webpage then click a button on the page which directs me to another page where I click another button (this happens a couple more times) and finally get the window that asks if I want to open, save, or cancel the Excel download and everything works fine. When I try to automate the process using sendkeys "{TAB}" and sendkeys "~" the workbook always open as a separate instance of Excel and I can't get the code (from the original) to recognize the newly opened workbook.
My questions are:
How can I force a workbook to open in the same instance as an already open workbook?
or
How can I refer to the new instance (I need to select a particular sheet in the new workbook in the new instance)?
or
What am I doing wrong with sendkeys?
or
I know that sendkeys is poor programming practice but I don't know how to use the information that comes up when I right click and select "view source". Is someone patient enough to explain it to me?
Thanks a ton for even reading this much. I'd be more than happy if someone could just point me in the right direction. I've been searching the internet for two days with no luck (although I have found some neat code...).
I'm having problems trying to automate a process of downloading workbooks. What I do manually is that I open a webpage then click a button on the page which directs me to another page where I click another button (this happens a couple more times) and finally get the window that asks if I want to open, save, or cancel the Excel download and everything works fine. When I try to automate the process using sendkeys "{TAB}" and sendkeys "~" the workbook always open as a separate instance of Excel and I can't get the code (from the original) to recognize the newly opened workbook.
My questions are:
How can I force a workbook to open in the same instance as an already open workbook?
or
How can I refer to the new instance (I need to select a particular sheet in the new workbook in the new instance)?
or
What am I doing wrong with sendkeys?
or
I know that sendkeys is poor programming practice but I don't know how to use the information that comes up when I right click and select "view source". Is someone patient enough to explain it to me?
Thanks a ton for even reading this much. I'd be more than happy if someone could just point me in the right direction. I've been searching the internet for two days with no luck (although I have found some neat code...).