I'm using VBA to pull a large amount of data from a closed workbook that's password protected. While the code that I've put in works smoothly, there are 2 annoying issues that remain that I'd like to get rid of, which I suspect may be related.
1) I have to enter the password twice - once when selecting the workbook to copy data from, and again after I select which sheet in the workbook to pull data from.
2) I also get a pop-up warning that formulas can not be copied, and that only values will be, despite using a pastespecial with values option.
I know that #2 is tied to the source workbook being opened as a new instance of Excel rather than opening it within the same instance, and I suspect that #1 may be due to the same.
I have limited VBA experience, but have been figuring it out as I go - how can I force Excel to open the new workbook within the same instance, instead of creating a new instance? Also, if the double password issue isn't tied to this, any suggestions on how to clear that up? I've done numerous searches on this site as well as general Google searches without having any luck finding code that directly relates to my issues, any help would be appreciated.
I'm using Windows 7 and Excel 2010.
1) I have to enter the password twice - once when selecting the workbook to copy data from, and again after I select which sheet in the workbook to pull data from.
2) I also get a pop-up warning that formulas can not be copied, and that only values will be, despite using a pastespecial with values option.
I know that #2 is tied to the source workbook being opened as a new instance of Excel rather than opening it within the same instance, and I suspect that #1 may be due to the same.
I have limited VBA experience, but have been figuring it out as I go - how can I force Excel to open the new workbook within the same instance, instead of creating a new instance? Also, if the double password issue isn't tied to this, any suggestions on how to clear that up? I've done numerous searches on this site as well as general Google searches without having any luck finding code that directly relates to my issues, any help would be appreciated.
I'm using Windows 7 and Excel 2010.