0

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(username) to the Current Username.....export to Location is documents, I don't need to change that part.

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

Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "C:\Users\seaq\Desktop\LAB 17025\Forms\Particle Distribution\Particle Dist Customer Report.pdf" _
    , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=True
1
  • Environ("Username") Commented Nov 24, 2015 at 1:39

1 Answer 1

1

E.g.

ActiveWorkbook.UpdateLink Name:= _
   "C:\Users\" & Environ("Username") & _
   "\Desktop\LAB 17025\Forms\Particle Distribution\PD FM Exported.xlsx", _
   Type:=xlExcelLinks
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.