AnsweredAssumed Answered

Exported Excel VBA Get Current User Name

Question asked by on Nov 23, 2015
Latest reply on Nov 26, 2015 by

I have a Filemaker Pro runtime DB that exports reports to Excel then opens in PDF, there is no problems running this on my machine but.....when a customer loads it onto there machine the VBA code (Current Username) needs to change. One big hurdle for me is to be able to distribute the Excel forms with my solution and have Excel know the different User name. So below is part of my VBA, I need to be able to change the SEAQ(Win or Current application user name) to the Current User name on my customer machine.....export to Location is documents, I don't need to change that part as the forms will be located in their documents folder for people to change as needed.

ActiveWorkbook.UpdateLink Name:= _
"C:\Users\seaq\Documents\LAB 17025\Forms\Particle Distribution\PD FM Exported.xlsx" _
, Type:=xlExcelLinks

.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\seaq\Documents\LAB 17025\Forms\Particle Distribution\Particle Dist Customer Report.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True