Jennifer25
New Member
- Joined
- Sep 25, 2019
- Messages
- 3
Hi looking for a bit of help please
I have my own C drive folder which I have a suite of reports set up which all contain macros that look to documents contained in my C Drive folder. I asked my company to create a local team folder so everyone in the team can access the reports and run the macros. My company have done this however the macro isn't working;
This is the old macro which works
Sub _Actuals()
Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
strPath2 = "C:\Users\jmmaxwell\Desktop\PERSAPS\Bids_Projects\Variance Reports\MASTERCOPY_ Actuals"
Set DestWbk = ThisWorkbook
Set wbkWorkbook2 = Workbooks.Open(strPath2)
Range("A2:V20000").Select
Selection.Copy
Windows("Monthly Variance Report.xlsm").Activate
Sheets("Actuals").Select
Range("C2").Select
ActiveSheet.Paste
wbkWorkbook2.Close SaveChanges:=False
End Sub
This is the new Macro
Sub Actuals()
Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
strPath2 = "\\rfrnhoffil01.rest.techscience.net\Cost Tracker\MASTERCOPY_ Actuals"
Set DestWbk = ThisWorkbook
Set wbkWorkbook2 = Workbooks.Open(strPath2)
Range("A2:V20000").Select
Selection.Copy
Windows("Monthly Variance Report YR1.xlsm").Activate
Sheets("Actuals").Select
Range("C2").Select
ActiveSheet.Paste
wbkWorkbook2.Close SaveChanges:=False
End Sub
I'm assuming the problem is down to strPath2 = "\\rfrnhoffil01.rest.techscience.net\OASIS Team Folder\Cost Tracker\MASTERCOPY_ Actuals"
It would appear that my company stores local folders onto a network drive, is there any way to make this macro work looking into documents stored into a folder on a network folder?
Thanks
Jennifer
I have my own C drive folder which I have a suite of reports set up which all contain macros that look to documents contained in my C Drive folder. I asked my company to create a local team folder so everyone in the team can access the reports and run the macros. My company have done this however the macro isn't working;
This is the old macro which works
Sub _Actuals()
Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
strPath2 = "C:\Users\jmmaxwell\Desktop\PERSAPS\Bids_Projects\Variance Reports\MASTERCOPY_ Actuals"
Set DestWbk = ThisWorkbook
Set wbkWorkbook2 = Workbooks.Open(strPath2)
Range("A2:V20000").Select
Selection.Copy
Windows("Monthly Variance Report.xlsm").Activate
Sheets("Actuals").Select
Range("C2").Select
ActiveSheet.Paste
wbkWorkbook2.Close SaveChanges:=False
End Sub
This is the new Macro
Sub Actuals()
Dim Fname As String
Dim SrcWbk As Workbook
Dim DestWbk As Workbook
strPath2 = "\\rfrnhoffil01.rest.techscience.net\Cost Tracker\MASTERCOPY_ Actuals"
Set DestWbk = ThisWorkbook
Set wbkWorkbook2 = Workbooks.Open(strPath2)
Range("A2:V20000").Select
Selection.Copy
Windows("Monthly Variance Report YR1.xlsm").Activate
Sheets("Actuals").Select
Range("C2").Select
ActiveSheet.Paste
wbkWorkbook2.Close SaveChanges:=False
End Sub
I'm assuming the problem is down to strPath2 = "\\rfrnhoffil01.rest.techscience.net\OASIS Team Folder\Cost Tracker\MASTERCOPY_ Actuals"
It would appear that my company stores local folders onto a network drive, is there any way to make this macro work looking into documents stored into a folder on a network folder?
Thanks
Jennifer