Automatically opening file saved to someone "Documents&Sett' direc

Help Needed.
I had developed a macro that was used by myself, however now the macro needs 
to be utilised by others.
The marco opens files, that have been exported from the corporate database.  
The files are saved automatically to the users C Drive eg. C:\Documents and 
Settings\"username – officer logged on"\help.xls
The only difference is the username in the file path.
Is there anyway that I can change the file path to automatically go to the 
correct file, without having to create a different macro for each user.
Any help would be greatly appreciated.

0
Utf
12/9/2009 11:43:02 AM
excel.programming 6508 articles. 2 followers. Follow

2 Replies
511 Views

Similar Articles

[PageSpeed] 55

This is the 3rd time this posting has appeared.  See URL

http://tinyurl.com/yejpz7e


-- 
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=160934

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

0
joel
12/9/2009 12:07:35 PM
Try

Msgbox Environ("UserProfile") & "\help.xls"

-- 
Jacob


"Max2073" wrote:

> Help Needed.
> I had developed a macro that was used by myself, however now the macro needs 
> to be utilised by others.
> The marco opens files, that have been exported from the corporate database.  
> The files are saved automatically to the users C Drive eg. C:\Documents and 
> Settings\"username – officer logged on"\help.xls
> The only difference is the username in the file path.
> Is there anyway that I can change the file path to automatically go to the 
> correct file, without having to create a different macro for each user.
> Any help would be greatly appreciated.
> 
0
Utf
12/9/2009 12:30:01 PM
Reply:

Similar Artilces:

A program is trying to automatically send e-mail on your behalf.
I tried posting this in microsoft.public.outlook.general, but no nibbles. ------------------------------------------------------------------------------------------------------ Does anybody know how to turn the "A program is trying to automatically send e-mail on your behalf." prompte off? It pops when one of my MS Access apps is emailing one of it's reports to somebody. It happens on the Citrix server that one of my MS Apps is running on, but it does not happen when the app is running on my own PC. Consequently I'm hoping for some user-configurable setting that controls...

Opening drawer time
Is there a way to set the opening time to when the drawer is actually opened and not when it was last closed (currently setup that way)? Thanks ...

Automatic CC
Hello, Is there any way to create a template where a contact is automatically CC in the email. So I dont forget to cc them every time I send an email. Thanks ...

Money 2006 constantly faults with automatic updates
Whenever I use the Internet automatic updates, money faults out and wants to send a report to Microsoft. Also my account list shows most accounts with a status of 'Update In Progress' I've done a complete reinstall after removing it and power cycling my machine. I thought it may have been something with removing 2004 and installing 2006, but got same problem Has anyone else been having this problem? I really just want to go back to Money 2004. What's the error message? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://money.mvps.org/faq f...

When start Outlook, it doesn't prompt for the password for PST file.
How to get the "Password for Personal Folder Dialog Box" to appear when Outlook starts. ...

Automatic axis format
Hi, I'm need to make a automatic axis format within excel. The number of rows is depending of a imported file. No problem to get the max. number of rows. But to put this number into the chart ( category axis) is more problematic. I try VB but my knowledge is at dummy level ! Waiting for your reply............. Hi, Have a look at Jon's examples of dynamic charts. http://peltiertech.com/Excel/Charts/Dynamics.html Cheers Andy jos wrote: > Hi, > I'm need to make a automatic axis format within excel. > The number of rows is depending of a imported file. > No problem to g...

Automatic updates, automatically disabling itself
Automatic updates, automatically disabling itself. 2nd day now onecare popped up to tell me the updates turned themselves = off. I'm thinking what malware would want to turn the updates off ? Any idea what's going on here ? Did I AUTOMATICALLY install an update = that caused this ? <keepout@yahoo.com.invalid> wrote in message news:8l7mi5tkgp1gd15fkef71ll5mrui9ukmht@4ax.com... > Automatic updates, automatically disabling itself. > > 2nd day now onecare popped up to tell me the updates turned themselves > off. Drop OneCare and install Microsoft Sec...

Unable to open sent items folder
I have delegated my freind to open my "sent Items" folder in my mail box ,but he is unable to open my "sent items" folder in his outlook2000. He is able to open my other folder like "inbox,calender" after delegation.Except the sent items. In oultook@ file >open other users folder>folder type ,the "sent items" folder is not listed .. Please help if there is any workaorund for this thanks SP He needs to add your mailbox to his folderlist. See http://www.howto-outlook.com/howto/permissions.htm -- Robert Sparnaaij [MVP-Outlook] www.howto-out...

I open the MDB, the form runs automatically
Simple question I have an MDB file with 20 files and 7 forms in it. When I open it up, the form runs immediately an access goes into some sort of protected mode. I can't view the tables, queries etc. I can see the code by pressing Alt F11 but not the data. I created a blank db and imported the mdb so I could see the tables. But how do I open the original without it running the code? When I look at the code. I don't see anything that sets properties or invokes the code automatically. There are no macros in this, just the forms and associated code with them. Any ideas Thanks Colm ...

How do I get an automatic equal sign to begin the formula bar?
How do I get an automatic equal sign to appear in the formula bar in Excel for Microsoft 2003? This happened for me in the 2000 version and I could just click on it with my mouse pointer, but now all that appears is the function sign with no equal sign after it. It makes my job a lot more time consuming to have to type in the equal sign while building formulas. Please help, anybody? The = icon disappeared in newer versions of excel (xl2002???). You can add an = icon Tools|customize|commands tab|Insert category (Scroll down the list until you find the = icon) And drag it to your fav...

Excel File Opening Via Hyperlink
What do I need to do within an Excel document to have it open in print preview mode when the Intranet link to this file is clicked? Thank you. Put this one line Macro in the ThisWorkbook code area: Private Sub Workbook_Open() ActiveWindow.SelectedSheets.PrintPreview End Sub -- Gary''s Student - gsnu200723 ...

My worksheet automatically adds a fill color when I enter text.
When I type text in a blank cell, the cell automatically is highlightes with the bright yellow fill. There is no conditional formatting on this workbook. Check your VBA editor. You might have an Event Macro which does what, usually, a CF does. Try to Increase the Macro Security to its maximum level in order to eliminate the Event Macro from running... You may, also consider to "rem" all the Macro commands by adding a Preceding apostrophe to each command. Micky > When I type text in a blank cell, the cell automatically is highlightes with > the bright yello...

Having numbers automatically appear bold
Hi all, Had such great advise last time, thought I'd try again. I have a large range of cells where I will be inputing sales figures i the form of currency revenue. The range is about G-I and 1-400. Th sales data will be a comparisson of YTD 2001 - 2004 revenue results. What I hope to do is have any figure that is above $30,000 appea automatically in bold so as to stand out as a good client. I gues there is something in the IF function to do this but I'm stumped. Any ideas? Thanks again in advance. Saxte -- Message posted from http://www.ExcelForum.com select the range you wa...

Converting .123 file to Excel
Hi there, Please help. How to convert a .123 file to Excel 2000? Thank you. Cheers, Ming Hi Ming! If they are .123 files you need to use Lotus to open them and then save them as .wk4 files which can then be opened by Excel 2000 -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "Ming" <mewong2000@yahoo.com> wrote in message news:08ab01c3c575$ff5d5ca0$a101280a@phx.gbl... > Hi there, > > Please help. How to convert a .123 file to Excel...

How to create a new document by clicking open?
**** Post for FREE via your newsreader at post.usenet.com **** Hi I'm using VC++ 6 and my problem is that I have a program (MDI) that displays images whenever a user clicks on the open button (on toolbar or menu). Everything works fine, until the user closes the MDI child window. The way my program works is that he now needs to click on 'File > New' to open a blank window, then to click on 'File > Open' to open the image in the newly created window. The user cannot open an image directly with the 'open' button if a blank window is not already created. How ca...

Is it possible to automatically move data entered in columns into rows?
Is it possible to automatically move data entered in columns into rows? It seems like a simple thing to do but I can't find a function anywhere. Cheers, Richard Thorneycroft Husky Products If you enter something in ONE cell it is automatically in a row and a column. So, perhaps a bit more explanation is in order. -- Don Guillett SalesAid Software donaldb@281.com "Richard Thorneycroft" <dancecommander81@hotmail.com> wrote in message news:9e2f3f75.0411160750.7003c6ab@posting.google.com... > Is it possible to automatically move data entered in columns into rows? >...

Why Do Excel Files Become Read-Only When I Extract from Excel to A
Title pretty much sums it up. I create an Excel file, I pull 2 or 3 worksheets into Access as import-tables. I work awhile in Access and then I go back to the Excel file and it's gone from a regular working Excel file to "Read-Only". I know it's an Excel question but I'm posting it here because it ONLY happens when I'm in Access. Thanks Are you creating a connection via vba? Most of the time this happens to me when there is a workbook already open with the same name but isn't visible. If you go to the task manager and look at the processes to see if a...

Open a Form to a Specific Record
Hi Gang, I have a database that has over 25,000 records in it. I have made a form that users are able to view/modify the data in it. Instead of scrolling through each record to get to the next record to be reviewed I was wondering if anyone had a way to open the form to a specific record. I have and EmployeeID and EmployeeName field. I would like the form to open if one or the other fields are empty. Is there anyway to accomplish this? I'm lost! Thanks for the help in advance -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200710/1...

Automatic Forward
How can I automatically forward messages received from a specific sender to another's e-mail person? Thanks, ...

CE6: How to Disable SIP popup automatically
Hi, I know SIP popup can be disabled by the following registry setting in CE5: [HKEY_CURRENT_USER\ControlPanel\Sip] "TurnOffAutoDeploy"=dword:1 But It doesn't work in CE6. How to disable SIP auto-Popup in CE6? Thanks. Eric The SIP Auto Deploy in CE is due to Windows Controls invoke SHSipPreference (exported by AYGSHELL.DLL). So the easiest way is to avoid including AGYSHELL (SYSGEN_AYGSHELL) But if excluding AYGSHELL is not an option, you may need to modify the SHSipPreference (PRIVATE\SHELL\SHELLPSL\HAVEAYGSHELL\shellpsl.cpp) to supress SIP s...

Outlook not opening
Dear friend, While trying to opening Outlook it gives a error messaging saying missing msoe.dll now what should I do....how to rectify the error please help ...

merging files
there is a folder containing 400 excel files which are on same pattern. I want to merge all files in a single new excel file. Hi Maaz See http://www.rondebruin.nl/copy3.htm Or one of the other examples on my site -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Maaz" <Maaz@discussions.microsoft.com> wrote in message news:78BD6D53-6DD7-4FDA-B812-98FA5073C243@microsoft.com... > there is a folder containing 400 excel files which are on same pattern. I > want to merge all files in a single new excel file. i am new user i didnt know about amcros would ple...

Lot Attribute table-IUSCOUNT filed
Hi Folks The Lot Attribute Master table IV00301 has a field called IUSCOUNT. Does anyone understand what that field is all about please? [Ver 10 sp 3] Many thanks Sheila ...

Automatically format charts with range of dates
What I am trying to do is I have 4 charts that are linked with data from another spreadsheet. They are basically week totals for my business and make a chart compared to say last year. What I want to do though is have an option on my report that I can enter in a specific date or a range of dates and have the charts automatically filter the new data in and change. Instead of having to go into the chart data and changing what series of data I want to have a chart for I want to be able to just enter eg. "April 12-April 18" and have the charts bring up that data to reflect the ...

Automatic Database Backup
Is it possible to right code to automatically backup a database? And if so how, or where, can I get information on this? Hi There are a few way to do this. I have windows scheuler doing this on all my databases (at 1 min past midnight each day). Open Scheduled Tasks (it's in the control panel). It's very simple and not likely to go wrong -- Wayne Manchester, England. "Ayo" wrote: > Is it possible to right code to automatically backup a database? And if so > how, or where, can I get information on this? Thanks Wayne. So I take it that, there is no way t...