Margie Burgett
New Member
- Joined
- May 23, 2008
- Messages
- 16
Hello all of you Experts,
I have been working (searching the web) on this in chunks for a couple of days and I am stumped. First off, I am a newbie to all this.
Here is my question?
I need to tweak an Macro (currently downloadsa CSV file type from the internet) in an excel workbook to trigger a WinZip Self-Extractor (.exe) located on a server that will run and copy a CSV data source file to a users hard drive.
Hope this makes sense.... here is a text staw dog of the VB code I require.
Summary:
Using Excel 2003
1. User opens excel (.XLS) workbook
2. Click on Macro button that runs
a. Data.ZIP exe file on \\Server\Reports\Pivot_Data_Source\
b. Winzip runs and saves extracted file to C:\Reports\Pivot_Source_Data\
Here is the VB code that does work beautifully for downloading files from an URL that was provided by Mav55th on this forum. I just need to figure out how to adjust it to address the ZIP executable (Data.EXE) question above:
Sub Copy_PSD_file_from_SP_Directory()
' PSD = Pivot Source Data
' Copy_PSD_file_from_SP_FC_Prf_Pltfrm
' Code below provided from Excel VBA User Forum (Mav55th)
' Status bar notification
Application.DisplayStatusBar = True
Application.StatusBar = "CSV data source file being copied from SharePoint, please be patient"
Dim i As Integer
Const strUrl As String = "http://enhanced1.sharepoint.com/teams/Pivot_Source_Data/Data.csv"
Dim strSavePath As String
Dim returnValue As Long
strSavePath = "C:\Reports\Pivot_Source_Data\Data.csv"
returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0)
' Status bar notification
Application.DisplayStatusBar = True
Application.StatusBar = "Refresh Process completed"
MsgBox "Pivot source data refresh process complete."
End Sub
------------------
Thanks!
I have been working (searching the web) on this in chunks for a couple of days and I am stumped. First off, I am a newbie to all this.
Here is my question?
I need to tweak an Macro (currently downloadsa CSV file type from the internet) in an excel workbook to trigger a WinZip Self-Extractor (.exe) located on a server that will run and copy a CSV data source file to a users hard drive.
Hope this makes sense.... here is a text staw dog of the VB code I require.
Summary:
Using Excel 2003
1. User opens excel (.XLS) workbook
2. Click on Macro button that runs
a. Data.ZIP exe file on \\Server\Reports\Pivot_Data_Source\
b. Winzip runs and saves extracted file to C:\Reports\Pivot_Source_Data\
Here is the VB code that does work beautifully for downloading files from an URL that was provided by Mav55th on this forum. I just need to figure out how to adjust it to address the ZIP executable (Data.EXE) question above:
Sub Copy_PSD_file_from_SP_Directory()
' PSD = Pivot Source Data
' Copy_PSD_file_from_SP_FC_Prf_Pltfrm
' Code below provided from Excel VBA User Forum (Mav55th)
' Status bar notification
Application.DisplayStatusBar = True
Application.StatusBar = "CSV data source file being copied from SharePoint, please be patient"
Dim i As Integer
Const strUrl As String = "http://enhanced1.sharepoint.com/teams/Pivot_Source_Data/Data.csv"
Dim strSavePath As String
Dim returnValue As Long
strSavePath = "C:\Reports\Pivot_Source_Data\Data.csv"
returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0)
' Status bar notification
Application.DisplayStatusBar = True
Application.StatusBar = "Refresh Process completed"
MsgBox "Pivot source data refresh process complete."
End Sub
------------------
Thanks!