I need to know how can i get current directory variable in macros programming. I am saving a file on desktop like this : C:\Users\deadlock\Desktop\data.html. Is it possible to replace the C:\Users\deadlock\Desktop\ with the current directly variable?
Here is my small piece of code:
ActiveWorkbook.ShowPivotChartActiveFields = True
With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
"C:\Users\deadlock\Desktop\data.htm", "Sheet1", "", xlHtmlStatic, "data_9438", "")
.Publish (True)
.AutoRepublish = False
Any Code-snippet will highly be appreciated.
Thanks in advance..
The current directory is available via VBA’s
curdir()& the directory of the current workbook viaActiveWorkbook.Path.Edit;