SimplyErick
New Member
- Joined
- Feb 3, 2012
- Messages
- 10
Hello,
I wrote a macro in Essbase and I'm having trouble posting to SharePoint. The macro refreshes a few tabs and saves a copy to a set location then changes the department name and repeats. When I use the SharePoint Location the macro fails, but when I use the C Drive Location it works. The odd thing is from within Essbase when I select both links they open the appropriate location.
SharePoint location
http://erooms/sites/CorporateBudget/2401 MI Click to Buy 20/Department Financials/05 2401 - Forecast Tool.xlsm
C Drive Location
\\Client\S$\ExternalReporting\FrederickE\Projects\Essbase Forecasting Tool\Speed\05 May\05 2401 - Forecast Tool.xlsm
Sub Rollout()
Dim strGARefresh As String
Dim strITRefresh As String
Dim strTrainRefresh As String
Dim strComRefresh As String
Dim strResRefresh As String
Dim varDepts As Variant
Dim strDept As String
Dim intDeptCount As Integer
Dim FilePath As String
Dim intGAcheck As Integer
Dim intInfocheck As Integer
Dim intTraincheck As Integer
Dim intRescheck As Integer
Dim intCapitalcheck As Integer
varDepts = Range("Departments")
intDeptCount = 1
Application.ScreenUpdating = False
For intDeptCount = LBound(varDepts) To UBound(varDepts)
Sheets("Summary").Range("CurDept") = varDepts(intDeptCount, 1)
strFilePath = Range("FilePath")
strComRefresh = Range("ComRefresh")
strResRefresh = Range("ResRefresh")
strITRefresh = Range("ITRefresh")
strGARefresh = Range("GARefresh")
strTrainRefresh = Range("TrainRefresh")
If strComRefresh = "No" Then
Sheets("Commerical").Visible = xlSheetHidden
Else
Sheets("Commerical").Visible = xlSheetVisible
End If
If strResRefresh = "No" Then
Sheets("Residential").Visible = xlSheetHidden
Else
Sheets("Residential").Visible = xlSheetVisible
End If
If strTrainRefresh = "No" Then
Sheets("Training").Visible = xlSheetHidden
Else
Sheets("Training").Visible = xlSheetVisible
End If
If strComRefresh = "Yes" Then
Sheets("RTVR 200").Activate
x = HypMenuVRefresh()
intComcheck = Range("ComCheck")
If intComcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strResRefresh = "Yes" Then
Sheets("RTVR 300").Activate
x = HypMenuVRefresh()
intRescheck = Range("ResCheck")
If intRescheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strGARefresh = "Yes" Then
Sheets("RTVR G&A").Activate
x = HypMenuVRefresh()
intGAcheck = Range("GACheck")
If intGAcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strITRefresh = "Yes" Then
Sheets("RTVR IT").Activate
x = HypMenuVRefresh()
intInfocheck = Range("ITCheck")
If intITcheck <> 0 Then
MsgBox "Check figure out of balance for IT", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strTrainRefresh = "Yes" Then
Sheets("RTVR Training").Activate
x = HypMenuVRefresh()
intTraincheck = Range("TrainCheck")
If intTraincheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
Sheets("RTVR Capital").Activate
x = HypMenuVRefresh()
intCapitalcheck = Range("CapitalCheck")
If intCapitalcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Call Tabhide
If Sheets("Commerical").Visible = True Then
Sheets("Commerical").Activate
Call HideRows
Else
End If
If Sheets("Residential").Visible = True Then
Sheets("Residential").Activate
Call HideRows
Else
End If
If Sheets("Training").Visible = True Then
Sheets("Training").Activate
Call HideRows
Else
End If
Sheets("G&A").Activate
Call HideRows
Sheets("IT").Activate
Call HideRows
Sheets("Capital").Activate
Call HideRows
Sheets("Summary").Activate
Call HideRows
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs strFilePath
Application.DisplayAlerts = True
'ActiveWorkbook.SaveAs Filename:=strFilePath
'Workbooks(strFilePath).CheckIn
Call Clear
Call Tabshow
Next
Application.ScreenUpdating = False
End Sub
I wrote a macro in Essbase and I'm having trouble posting to SharePoint. The macro refreshes a few tabs and saves a copy to a set location then changes the department name and repeats. When I use the SharePoint Location the macro fails, but when I use the C Drive Location it works. The odd thing is from within Essbase when I select both links they open the appropriate location.
SharePoint location
http://erooms/sites/CorporateBudget/2401 MI Click to Buy 20/Department Financials/05 2401 - Forecast Tool.xlsm
C Drive Location
\\Client\S$\ExternalReporting\FrederickE\Projects\Essbase Forecasting Tool\Speed\05 May\05 2401 - Forecast Tool.xlsm
Sub Rollout()
Dim strGARefresh As String
Dim strITRefresh As String
Dim strTrainRefresh As String
Dim strComRefresh As String
Dim strResRefresh As String
Dim varDepts As Variant
Dim strDept As String
Dim intDeptCount As Integer
Dim FilePath As String
Dim intGAcheck As Integer
Dim intInfocheck As Integer
Dim intTraincheck As Integer
Dim intRescheck As Integer
Dim intCapitalcheck As Integer
varDepts = Range("Departments")
intDeptCount = 1
Application.ScreenUpdating = False
For intDeptCount = LBound(varDepts) To UBound(varDepts)
Sheets("Summary").Range("CurDept") = varDepts(intDeptCount, 1)
strFilePath = Range("FilePath")
strComRefresh = Range("ComRefresh")
strResRefresh = Range("ResRefresh")
strITRefresh = Range("ITRefresh")
strGARefresh = Range("GARefresh")
strTrainRefresh = Range("TrainRefresh")
If strComRefresh = "No" Then
Sheets("Commerical").Visible = xlSheetHidden
Else
Sheets("Commerical").Visible = xlSheetVisible
End If
If strResRefresh = "No" Then
Sheets("Residential").Visible = xlSheetHidden
Else
Sheets("Residential").Visible = xlSheetVisible
End If
If strTrainRefresh = "No" Then
Sheets("Training").Visible = xlSheetHidden
Else
Sheets("Training").Visible = xlSheetVisible
End If
If strComRefresh = "Yes" Then
Sheets("RTVR 200").Activate
x = HypMenuVRefresh()
intComcheck = Range("ComCheck")
If intComcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strResRefresh = "Yes" Then
Sheets("RTVR 300").Activate
x = HypMenuVRefresh()
intRescheck = Range("ResCheck")
If intRescheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strGARefresh = "Yes" Then
Sheets("RTVR G&A").Activate
x = HypMenuVRefresh()
intGAcheck = Range("GACheck")
If intGAcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strITRefresh = "Yes" Then
Sheets("RTVR IT").Activate
x = HypMenuVRefresh()
intInfocheck = Range("ITCheck")
If intITcheck <> 0 Then
MsgBox "Check figure out of balance for IT", vbOKOnly
Exit Sub
Else
End If
Else
End If
If strTrainRefresh = "Yes" Then
Sheets("RTVR Training").Activate
x = HypMenuVRefresh()
intTraincheck = Range("TrainCheck")
If intTraincheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Else
End If
Sheets("RTVR Capital").Activate
x = HypMenuVRefresh()
intCapitalcheck = Range("CapitalCheck")
If intCapitalcheck <> 0 Then
MsgBox "Check figure out of balance for G&A", vbOKOnly
Exit Sub
Else
End If
Call Tabhide
If Sheets("Commerical").Visible = True Then
Sheets("Commerical").Activate
Call HideRows
Else
End If
If Sheets("Residential").Visible = True Then
Sheets("Residential").Activate
Call HideRows
Else
End If
If Sheets("Training").Visible = True Then
Sheets("Training").Activate
Call HideRows
Else
End If
Sheets("G&A").Activate
Call HideRows
Sheets("IT").Activate
Call HideRows
Sheets("Capital").Activate
Call HideRows
Sheets("Summary").Activate
Call HideRows
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs strFilePath
Application.DisplayAlerts = True
'ActiveWorkbook.SaveAs Filename:=strFilePath
'Workbooks(strFilePath).CheckIn
Call Clear
Call Tabshow
Next
Application.ScreenUpdating = False
End Sub