Hi. I am building a macro power query and I want to share it with other people. It uses a folder saved on your desktop but obviously people have different logins. How can I change the source name to recognize the username for the desktop? Thank you. Here is the beginning of my code
VBA Code:
ActiveWorkbook.Queries.Add Name:="Manifests", Formula:= _
"let" & Chr(13) & "" & Chr(10) & " Source = Folder.Files(""C:\Users\username\Desktop\Manifests"")," & Chr(13) & "" & Chr(10) & " #""Filtered Hidden Files1"" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true)," & Chr(13) & "" & Chr(10) & " #""Invoke Custom Function1"" = Table.AddColumn(#""Filtered Hidden Files1"", ""Transform File from Manifests"", each #""Transform File from Manifests""([Content]))," & Chr(13) & "" & Chr(10) & " #""Renamed Columns1"" =" [B]& _[/B]