I have the following macro which I am using on my desktop.
If I shared the same file so that others can also use, it is not working because of the username. My user name is "user1" and there are 70 users which want to run the same file in same manner. So any suggestions so that to capture the username automatically or any help????
The belo macro is working fine for me
PHP Code:
Option Explicit
Sub Copy()
Dim fpath As String
Sheets("Raw Data").Range("A2:AE13000").ClearContents
fpath = "D:\Documents and Settings\user1\Desktop\"
Workbooks.Open (fpath & "usc.xls")
Workbooks("usc.xls").Sheets("Survey Details").Range("B5:BF12000").Copy Workbooks("CSAT US&C Falcons.xlsm").Sheets("Raw Data").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Workbooks("usc.xls").Close
End Sub
Bookmarks