View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.datamap
Tim Miller Tim Miller is offline
external usenet poster
 
Posts: 10
Default Query based on logged on user (Newbie)

I'm pulling data into excel from a SQL database. Rather than create several
identical workbooks where each queries a different users information, can I
add some code at some level that matches the [User_Name] field in the data
to the Windows logged in user name on the computer. Both are first intial +
last name.
The one workbook would have several different data sources (different SQL
Views from the same database) and each would refresh automatically upon
open.

If I can, is there some simple code anyone could offer me on this?

Thanks for any direction at all!
Tim