Search forums. Log in. Install the app. If you forgot your password, you can reset your password. JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding. You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser. Thread starter floggingmolly Start date Nov 26, Joined Sep 14, Messages I have a code that downloads a file from our sharepoint site to a specific folder on my computer.
Is there any way to change it so it will download to whatever folder my workbook is in? We have weekly folders where we save the workbook so I want the downloaded file to save in the folder where the current workbook will be. Below is the code I have so far. Any help would be greatly appreciated. Stream" oStream. Open oStream. Write WinHttpReq. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks. Podcast Making Agile work for data science.
Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.
Accept all cookies Customize settings. But as we have already defined the source and destination location folders in above for both variables. Step 7: So here we can directly select those variables. First select source location variable which is FirstLocation. Step 8: Again in a similar way, select the destination location variable which is SecondLocation as shown below. Step 9: Once done, we will compile the code by pressing F8 functional key.
And if there is no error found, then run the code. We will see, the file from source location is copied and pasted in the destination folder as shown below. We can try different location path as well. And the destination folder will be Output Location folder which is under Input Location folder.
If we see inside the file, there is no data available. Now we will replace the source and destination in variables FirstLocation and Second Location respectively followed by the file name and its extension. We will see, the Test word file is now copied from the Input Location folder to Output location folder with the same size which is 0 KB.
Here we discuss how to Copy an Excel file using VBA Code along with practical examples and downloadable excel template. You can also go through our other suggested articles —. Submit Next Question.
0コメント