Return User Id Or Name
Jul 22, 2007i have been looking everywhere to find a way to get user info.
in excel, is there a formula or macro so that when saved, the user info is put in the file without the user putting their own name or id?
i have been looking everywhere to find a way to get user info.
in excel, is there a formula or macro so that when saved, the user info is put in the file without the user putting their own name or id?
i have an excel doc. with three sheets...
i may start that macro on any sheet any cell
the 1st thing that macro does is to go to sheet1 and after running the whole code it calls another macro... macro2
now macro2 runs in an infinte loop and runs evry 20 sec. the problem is every 20 sec the cursor comes back to sheet3.. i want the macro to return to the place where the user was working.. best wud be that the user can work seem lessly...
how to return value from VBA User Defined Funtion
View 9 Replies View RelatedI am writing some code where I will need to refresh data and do a few calculations while the user of the spreadsheet is working on the information. How do I write the code for VBA to record what sheet/ cell the user is currently on and then do i use the "GoTO" function to return the use to where he/she was when they left off.
View 5 Replies View RelatedThe format for the sheet is set in stone and can't change, and therefore my macro's operate on set columns / rows amd cells.
Because the sheet is huge, im trying to figure out a way to only run the macro's that need to run and more specfically on the changed location.
The Question
I need to create a routine that on the user changing a cell, it returns the cell position (row,column), then it will call a routine i have already which decides based on the cell location, which macro to run and where.
I am trying to create a macro that will compare several un-formatted workbooks and copy just what I want to a workbook of my one.
I start by having 2 different workbooks opened ("Main" and "Change") side by side like this: 1.jpg
Then i run the macro in my "Main" workbook and it should appear an Userform like it showed in the image below: 2.jpg
This is so that i can manually fill the user form with the correct columns by looking at the excel file, for example:
Ref=E3;City=G3; Data=I3.
Pressing Ok, it fill the "Main" workbook with the matching information so it and closes the "Change" workbook.
At the moment my code is in this stage:
VB:
Private Sub CommandButton1_Click()
myfile = "C:Userssst1brgDesktopRelatorios" & TextBox1.Value
Application.Workbooks.Open Filename:=myfile
Windows.Arrange ArrangeStyle:=xlVertical
[Code] .....
But I am stuck because there isn't any error and nothing happens.
I am working with a fiscal year that starts in December and ends in November. I want to make a user defined function that will return the fiscal year of a date. I've created the below code, but it returns a zero.
Function FiscalYear(DateFY)
If Month(DateFY) = 12 Then
Year (DateFY) + 1
Else
Year (DateFY)
End If
End Function
I'm creating a macro that creates a co-ocurrence matrix from variables that are adjacent to each other.
In order to proceed, I need to know how to return the column number of the first (leftmost) column in a range that the user selects.
I have an excel file with multiple sheets. I want my HR team to update that file, but one user shouldnt see the entries of other users. I want to make a consolidated file out of three files. This excel template is for salary input.
View 3 Replies View RelatedI have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.
What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)
find attached zip file . if you open the file then you can understand the problem.
I need to change cells color and text color as per user choice in Password protected sheet : (user is useing excl2000)
Kindly open attahced file i putted the note inside the file.
I am trying to check a user input to see if the user has entered the date correctly. I am using the code below but it keeps giving me a "Type Mismatch" error.
View 2 Replies View RelatedAn Excel file named CLEARING is availble in thr central server system. it will be accessed by 5 or 6 staffs from some other systems what i need is when one person accesses/edits this file the others should not even able to open in the read only file ,when the file is saved and closed ,then only the next person should access it
View 1 Replies View RelatedI have a workbook that is used to track overtime hours worked through the year. I've received some help from users on this forum, and others, to create the necessary macros and formulas to allow a supervisor to make use of the form; however, the workbook is also used to track those that wish to volunteer to work overtime each weekend. The sheet has a list of names for the employees on each shift, then a column to allow a "Y" to be placed under the date - designating them as a volunteer for any overtime available. I've found this spreadsheet (attached - from this site) that will allow individual users to access the workbook and have unique passwords for each. I don't completely understand how it works, but I feel it may be a start to getting what I want.
Essentially, once the user selects their name and inputs their password, I'd like the workbook to be opened and then allow them to only manipulate the row associated with their name. That row will change from week to week, so specific numbers will not be able to be used, but their name will be the same as the name used in the logon.
I feel like I'm asking for a lot here, so just some initial guidance on whether this type of thing is possible would be an acceptable answer.
I have a spreadsheet with the following headings:
A
Claims Number
B
Name
C
Scheme
D
Admin
E
Date
I need to create a user form that will "pop up" and ask the administrator to enter the above details.
A - should be created automatically (ie last claim number + 1)
B - user enters manually
C - data retrieved from a list
D - data retrieved from a list
E - date is the date the information is entered
How can I set a TextBox in a user form to the Windows's User Name?
View 6 Replies View Relatedhow to get informazion with VBA code about the name of the user who opened already a workbook on the network.
Usually if somebody wants to open a file that is opened by another user, office applications give informations that the file is open and about the name who opened that file.
Is it possible to get this information with VBA code, too?
I am trying to create a data entry sheet to enter quotes on. When a quote is received, I click on my "Add quote" button and a userform appears. Data is entered into the userform (frmEntryForm) and returned back to the next available row.
I also need to be able to:
Edit a row by double-clicking it. When a row is double-clicked, data from that row is passed back to the userform, edited and returned back to the same row (to prevent duplicates).Validate that all fields are complete within the userform where relevant (i.e. if the work is not complete or in progress then the "Invoice Number" and "Actual Cost" fields are disabled and blanked to prevent entry (I think this is almost sorted judging by my tests)
I have attached my sheet : 2014 Gatwick Quote Log (Macro Enabled).xlsm‎
How to return address of the column or cell I selected from Application.Inputbox, not just return the value?
[Code] ....
Is there a way with the following formula to tell it that if value return is = to value of cell above then find return next value?
View 6 Replies View RelatedI am trying to find the largest value, second largest, and third largest value for a column of numbers then return a content value for the adjacent column that contains the name for which each. The problem I am running into is when the second highest has the same value as the highest and also when the third value is zero (n=meaning there are only non-zero numbers for the column). I am using these formulas currently whic work when the numbers are not the same and I have atleast 3 non-zero numbers but I need to modify in order to account for the problem stated above...
View 8 Replies View RelatedHi, I desperately need help with a pivot-table and can't find anyone else who's ever had this problem...I have a very large healthcare data table which for simplicity I will describe as follows. In essence the first two columns respectively are (A) location and (B) month. Let's say the third column (C) is the number of cases of the disease kidpox treated in each health centre during that month. The fourth column (D) is the total number of cases of everything treated during that month in each clinic. The fifth column (E) is the proportion of cases of this disease over all consultations for each health centre and month, and the formula in E2 is .....
View 9 Replies View RelatedI am using the averageIf function and I need the cell to show 0 when then results are not positive. How to resolve my calculation
=AverageIf(a1:a10,">0",a1:a10) displays #DIV/0!
I want it to show 0 only
I am trying to integrate an optimization model to a simulation model using VBA in Excel. I am using ShellandWait and calling some batch files to call scripts for application command line operation. Everything ran fine until I tried to read in additional data using modules from an Excel add-in that I customized (err, more like butchered actually). Now, as far as I can tell sporadically (the call to the new module occurs randomly), Excel just closes in the middle of the simulation. Are there certain types of errors that behave this way? Is there someway to view or create an error log or similar, that I can go over after the crash?
*Edit*
I actually solved the problem (it was a database timer expiration initiated in a fortran routine by the customized add-in). This was just pure dumb luck - in effect, I was trying the brute force approach and happened to hit the solution relatively early. If anyone knows of some method of logging Excel or VBA activity (I guess that is the right term)
Is there a way to put a time stamp with the users name into an adjacent cell when a cell is updated?
In case that didn’t make sense I will tell you what I need this for. We are creating new time cards that require both employee and manager approval on them. We have many remote employees and getting their signature can be a pain. If they could click a button on the time card that stamped their name and time that would be ideal. They would then send to their manager they would click to verify the time and it would stamp it as well.
I have a user that is having problems with AutoSum updating after a cell is deleted. He has the following...
100
200
100
400
If he deletes one of the cells, (lets say 200), the autosum number stays at 400. I reinstalled his MS Office and it worked for a few days, but now he is having the same problem.
So now he has...
100
100
400
I have designed a spreadsheet in the office where I work, and think it would be quite flashy (gimiky) if I could have the spreadsheet show the name of the user logged on.
At the minute if I try and access a sheet currently open by another user it will come up with the standard message 'workbook1.xls is currently in use by xxxxx' then you open a read only copy until they have finished.
I was thinking there must be some way of importing this information to excel to display something like 'welcome (xxxxxxxx)(user currently logged on)'
The other part of my problem is that the excel sheet will only display the network uername of the user, but I have seen spreadsheets that cross reference this to the Microsoft Outlook global address list on the MS Exchange server, and display the users actual name.
In a nutshell, I just want to know is there anyway the excel spreadsheet can display the username currently logged into the shared spreadsheet.
I have a 3 2 user forms, plus a calandar pop-up user form. One is a Log In Screen with a user id combo box and a password textbox referenced to ranges in a very-hidden sheet.
My second form is a spend tracker with mulitple fileds, text boxes, combo boxes, etc.
One of the fields in the spend tracker is user name, what I would like to do is when a user enters their user name and password the entered user name as long as it matches one in the database be populated in the user name field and not allow it to be edited. Is there a way to do this, if so, what is the code and where do I put it.
I will attach my file so you can check it out. Log in: tester
Password: test01
Programmers Access Code is 1234.
In my User Form, one of the combo boxes has names. How can I restrict this box so the name chosen is the same as the Windows user?
View 14 Replies View RelatedI have created an addin that runs several macros. To enable the user to undo any changes, I keep a backup prior to them using any of the macros in the form of a worksheet named back00xx. I want a prompt to be displayed to the user to remove these backups at the closing or saving of the file. The problem is that as an addin, how do I get it to display this prompt as the open workbook is not part of the addin.
Could one have a looping routine that is checking every xx min/sec to check if the current workbook contains any sheets starting back00