Hi
I had an excel file where one of the macros saved the file as a new workbook to the users last open folder.
I now want to save the new file in to a SharePoint library folder but as the user has to choose a content properties, its coming up with a debug error.
The content is a droplist of Region & Country. I thought I had this worked out after reading forums but still getting an error and would appreciate any advice on how to correct..
Original code:
Adapted code:
In case it matters: the values in Instructions are..
Path: G2 = https://teams.xxx.xxxxx.com/sites/PartnerTestTeamPIT/MoveTemplates/
Property: G3 = is a look up formula based on another field the user has selected to return Region and Country in the same format as what they would have had to select on SP.
Many thanks for any advice, I think I am close but yet so far as usual!
Melissa
I had an excel file where one of the macros saved the file as a new workbook to the users last open folder.
I now want to save the new file in to a SharePoint library folder but as the user has to choose a content properties, its coming up with a debug error.
The content is a droplist of Region & Country. I thought I had this worked out after reading forums but still getting an error and would appreciate any advice on how to correct..
Original code:
VBA Code:
Sub SaveAsNewWkbook_New7()
Application.ScreenUpdating = False
RemoveFilters1a
ThisFile = Sheets("Instructions").Range("G1").Value
ActiveWorkbook.SaveAs Filename:=ActiveWorkbook.path & Application.PathSeparator & ThisFile
RemoveFormulas6
ActiveWorkbook.Save
Application.ScreenUpdating = True
'Sheets("Send Email").Range("A1").Select
MsgBox ("Workbook Created. Post to SharePoint & Notify PMs.")
Protect
End Sub
Adapted code:
VBA Code:
Sub SaveAsNewWkbook_New7()
Application.ScreenUpdating = False
RemoveFilters1a
ThisFile = Sheets("Instructions").Range("G1").Value
ThisPath = Sheets("Instructions").Range("G2").Value
ThisProperty = Sheets("Instructions").Range("G3").Value
ActiveWorkbook.ContentTypeProperties("Region and Country").Value = ThisProperty
ActiveWorkbook.SaveAs Filename:=ThisPath & ThisProperty & ThisFile & ".xlsm"
RemoveFormulas6
ActiveWorkbook.Save
Application.ScreenUpdating = True
'Sheets("Send Email").Range("A1").Select
MsgBox ("Workbook Created. Post to SharePoint & Notify PMs.")
Protect
End Sub
In case it matters: the values in Instructions are..
Path: G2 = https://teams.xxx.xxxxx.com/sites/PartnerTestTeamPIT/MoveTemplates/
Property: G3 = is a look up formula based on another field the user has selected to return Region and Country in the same format as what they would have had to select on SP.
Many thanks for any advice, I think I am close but yet so far as usual!
Melissa