Forum Discussion

rpaikha's avatar
rpaikha
Regular Visitor
7 years ago
Solved

How to get variable source data name - ("C:\Users\>>>>USERNAME <<<<

Hello,

 

 

I'm having a problem in refreshing data because souce of data is changed based on each labtop.

 

I have developed the VBA using function Environ("USERPROFILE") to save the raw data. Then, I distribute this file to other colleagues where USERNAME will be different by each laptop. 

 

Is anyone know how to change "USERNAME" to be variable just like Environ("USERPROFILE") in VBA ?

 

 

= Csv.Document(File.Contents("C:\Users\USERNAME\Filename.txt")

 

 

1 Reply