Linked Table (Excel file) that changes by User?

Philem

Active Member
Joined
Jan 2, 2003
Messages
282
Hullo!
Situation:
Several users maintain their own datasheets in Excel, and each sheet has PRECISELY the same format, all stored in the same network directory, all with unique names and record information that varies from user to user. Each user needs to have the same set of queries run, using their own Excel sheet as a source.

Question:
How to vary the linked table source via VBA?

Have:
Code to find UserName; assume return is STR type.

Example:
The linked table is called UsrInfo. When Bob logs into the database and runs the Results query, it would need to programmatically change the source for UsrInfo to match Bob's sheet.

Hopefully this makes sense. Any help would be appreciated.

Thanks! (y)

P
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
RESOLVED

Had to go different path, using multiple queries, each referencing different users.

Thanks for looking, though! (y)

P
 
Upvote 0

Forum statistics

Threads
1,221,810
Messages
6,162,108
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top