Hi, Bestia,
once you refer to a workbooik you should have tghe extensio to that as well as part of the name.
So if you have an xlsm workbook it may look like
Workbook("Product_Prices.xlsm").Worksheets("GobalSettings").Range("B4").Value = Date
But I think you may simplify if GlobalSetting is located in the same workbook Prodduct:
Sub CreateCSV()
Dim strFileName As String
strFileName = Application.GetSaveAsFilename(filefilter:="Comma Seperated Values (*.csv), *.csv")
If strFileName <> "False" Then
Worksheets("GobalSettings").Range("B4").Value = Date
Sheets("products").Copy
ActiveWorkbook.SaveAs strFileName, xlCSV
End If
End Sub
which would only alter the date if a string for savoing the csv is chosen.
Ciao,
Holger
Bookmarks