Find Out Who Is Logged On When Running My Macro
Feb 17, 2009I want to find out who is logged on when running my macro.
View 2 RepliesI want to find out who is logged on when running my macro.
View 2 Repliesis it possible to calculate the total duration of logged in from the data below?
TimeDateTimeExtCoDial Number08:02:00 AM11/10/200908:02AM203LOG IN08:03:00 AM11/10/200908:03AM2033448249908:05:00 AM11/10/200908:05AM207LOG IN08:05:00 AM11/10/200908:05AM132102445477708:08:00 AM11/10/200908:08AM207102445477708:11:00 AM11/10/200908:11AM1322908:11:00 AM11/10/200908:11AM1323008:12:00 AM11/10/200908:12AM2073008:12:00 AM11/10/200908:12AM2032908:13:00 AM11/10/200908:13AM132202631121108:14:00 AM11/10/200908:14AM203LOG OUT
Column 'A' has the time and extn# on column 'D' and indication of logged in or logged out on column 'F'
there can be several log in and log out by an extn.
I added this code to a userform initialize & now I get a message ' can't find object or library '. Which library do I have to activate in Tools, References.
Dim x As Integer
ComboBox1.AddItem "0"
For x = 1 To 20 Step 1
ComboBox1.AddItem Format(x, "0")
Next x
ComboBox1.Value = Sheet2.Range("E1").Value
ComboBox2.AddItem "0"
For x = 2 To 90 Step 2
ComboBox2.AddItem Format(x, "0")
Next x
ComboBox2.Value = Sheet2.Range("E2").Value
The word Format is highlited in userform initilize.
Is it possible to have a MsgBox that would say "Hello" to the user who is logged in on that computer. How would you reference the user info?
View 4 Replies View RelatedIs it possible for a formula to calculate SLA's based on the time its logged on the spreadsheet.
For an example if a spreadsheet is opened and a date of a query logged in cell A1, this date would be 23/01/09. This would then be given an SLA date in cell B1 of 23/01/09. Unless this was inputted on the spreadsheet after 3pm then it would be given a SLA of 24/01/09.
Is there a formula which could do this as we have to manually check around 3pm and manually update all the SLA's.
Sorry it also needs to exclude weekends and bank holidays.
calculating the number of calls logged in a shift, based on a 3 shift system in a day. shift 1 from 08h00 to 16h00, shift 2 16h00 to 24h00, and shift 3 00h00 to 08h00. each shift receives a number of calls based on the time the call was submitted.
View 2 Replies View RelatedI've been tasked at work to make an excel file to do more than what I think I can figure out on my own. What I need done is this:
1. Every Monday, check excel file for data
2. If data exists, send email with said data
Here's my issues:
How do I get the workbook to open while logged off the computer? The file is stored on a share network drive, not locally. How do I get it to send an email without someone logged on to click "send"?
I tried using windows scheduler, but I don't have sufficient privileges to run as batch (IT restrictions).
I am trying to ask to the user to check if they logged out when they close the workbook but my code is not working...
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("OD&D Log-in").Select
If Range("H5") = "reconcile" Then
a = MsgBox("Do you want to Log-Out?", _
vbYesNo)
If a = vbNo Then Cancel = True
If a = vbYes Then
Sheets("OD&D Log-in").Select
Else
Workbooks("Daily OSD Log (ver5).xls").Close SaveChanges = True
End Sub
I am having an issue with Excel creating a duplicate file when logged in as a user with restricted permissions on our network. If I modify a file while logged in as another user, excel will save the file but will also create a duplicate file with an eight character random name and no file extension. For example if user "Dave" opens a file called test.xls and saves it, in that same folder on the server a file named 296E9E20 will be created. Users are using Windows XP SP3 boxes and the server is running Win 2003. I am not sure why this only happens with Excel.
View 3 Replies View RelatedI thought my code was working properly, but then I tried different numbers for myNum and I realize it's not. Here's the
View 5 Replies View RelatedHere in our department we made a pretty elaborate macro that takes a report and sorts them out to 17 different sheets in a one workbook. This Macro pulls a file from a specific location on our server and then opens the CSV sorts it out color codes all the important information and saves it back onto the server under you specific initials.
They are four PC's along with our Managers laptop that run this Macro daily.
About 3 weeks ago my Managers laptop stops running the Macro completely and hangs in the middle of the whole thing. Eventually crashing Excel.
We try to remove the modules and re-import them back into the personal macro workbork but this does not work. The Macro's did not change and still fully function on the other four desktops to this day.
I uninstall Office on my Managers laptop and reinstall. Import the Modules again and still hangs up in very same spot it did 3 weeks ago.
I've tried to lower the macro security to the lowest level also and I've still had no luck with this laptop. I don't understand. The Macro's function perfectly on other PC's but will not function on this laptop.
I have a Sheet sheet1 and I want to run a macro when the cell D2 in Sheet1 is equal to 10,7,5,and 3. I only want this macro to run when those values are reached the macro then puts the data onto a sheet called wps. The macro is run as a module and is a sub macro.
I'm trying to work out to most efficient way of making a quality monitoring system which uses traffic lights to show problem products.
The traffic light system need to obey the following "rules".
Each product is tested once daily When a product fails once it moves to Amber, When a product Fails twice in a row it moves to RedOne pass when a product is in Amber Status, will reset it to green.If a Product is in Red status, it much have 3 consecutive passes to reset to Green.
I have tried to use array formulae to look up a column for previous values in the past for this sort of thing, but with 100000+ rows it runs far too slowly.
Banana Problem?
Product
Result
Traffic Light (0=green, 1=amber, 2=red)
[Code].....
Can i run a macro by just the pointer going over it.
View 9 Replies View RelatedI'm trying to get a macro to run when the user presses the save button. I have the following code:
[Code] .......
This code is supposed to apply the TRIM function to every worksheet in the workbook when the user presses save, and the saves the results. I understand the Private Sub bit is the code to have the macro run during the save, but for some reason the macro itself isn't actually running. I'm not getting any error message, its just that the cells which should have the TRIM function applied to them aren't being corrected.
I have a macro that takes about a minute to run. I would like to add a progress bar to appear once the macro starts running. There are no loops in the macro. What are my options?
View 3 Replies View RelatedI have 3 different sheets with a private sub on each all labelled
Private Sub CommandButton1_Click()
The macro's runs fine on each page.
I want to put a macro on a separate sheet that i can run each of those macro's
I did initially copy the original private macro and change the
Private Sub CommandButton1_Click()
to
sub report()
But I couldn't do all 3 in the same manner. i did change each name to something different... the other 2 subs did run, but they didn't do anything except put the massage box on the end saying that "the macro has finished".
The private macros are on sheets 26, 28 and 12.
I have 7 different workbooks as part of my daily routine.
At present the first workbook is opened via the task scheduler, and the macro is run using the following code
[Code] .....
This then opens the next workbook and closes the current one. The next workbook then runs its macro again from a timed call
[Code] ...........
This repeats for 7 workbooks. The problem is, if a macro overruns - the whole schedule is out of sync when macro's are called depending on the time. What I would like to do, is link each macro by calling for the next one, and closing the current workbook. However, when i have tried to do this, the macro has always stopped when the workbook has been closed - the next macro doesn't run.
Below is the entire code that I am using. It is a simple routine which checks whether a part has started its release process or not, based upon dates. The code works and does what I want.
The problem that I have is that it is very slow, for example it takes 35 seconds to go through 530 lines items. In my (limeted) experiance, based on other VBA doodlings this slow.
Is it possible to run a macro from an IF command?
View 9 Replies View RelatedI already have a macro made named (PowerPoint) that is saved to the wookbook. I am looking for a way to have this run every 20min. I have tried several differnt things and it did not work. Here is one I found online. I only need it to run when it is open and every 20mins. as long as I have it open.
View 3 Replies View RelatedI have 2 workbooks (Workbook1 and Workbook2).
Workbook 1 contains a button, that calls a macro. This macro calls a macro from Workbook 2.
For this, I am using the Application.Run function.
The Macro in Workbook2 is a simple one line macro that updates cell A2 to a value of 6.
Range("A2").Value = 6
This works fine!
However, I want the the cell A2 in WORKBOOK1 to change to 6, not the cell in Workbook 2.
To add an element of difficulty, Workbook 1 could have any name (I won't know what it is, as the user could change it).
How can I get the Macro in Workbook 2 (Called from Workbook1), to update the cells in Workbook 1.
I have a problem with a macro in Excel 2007. It invokes
solver and creates an answer report. Please find the VB
code for macro, below.
How do I ask for a confirmation box before running a macro, but only one time. What I mean is some of the macros I use loop and it wouldn't be practical to click on "ok" for each time the macro ran.
So again I just need some code to tack on to the beginning of a couple of my macros that will ask me before they run but only once.
I have the following macro in a worksheet...and it is running very slow. There are other macros in the worksheet and they all run very well. Any ideas by looking at this code why it would be so slow in running?
View 7 Replies View RelatedI have a spreadsheet containing a macro to automatically sum values from week to week and display the max/min and average. This is almost fully working. The problem I have is the macro copies the sum formula down the page and doesn't stop at the last row. It always adds one or two extra rows. The formula should stop at row 77 however this does not happen and therefore the sum keeps going. Which in turn, distorts the max/min figures.
View 2 Replies View RelatedI have 2 files in a folder, "Main.xls" and "My Database.xls". "My Database.xls" contains the following macro in 'Module1':
View 2 Replies View RelatedI am trying to utilise a vba script for DNS resolution which i got from Followup: DNS Lookup and Ping in Excel - CodeProject
I have a list of IP addresses that I want to use this on, however if I test this by using the test instructions, excel does nothing, its just text in a cell, so I would like to know how would this procedure get called from the spreadsheet?
Code:
GetHostname("4.2.2.1") in any Excel cell.
or
Use: GetIpAddress("www.google.com") in any Excel cell.
I am trying to achieve an automated macro.
I would like my spreasheet to look at cell B2, compare this to a list of information in Sheet2 and if it matches, run Macro1
I'm trying to run what is a pretty basic macro when a file is closed
Sub Auto_Close()
FileCopy "C:Documents and SettingsdaveDesktopWorking olderPlanner.xls", "S:LeavePlanner.xls"
End Sub
I've checked that the Auto_Close feature is what I need, but it just doesn't seem to be running
I've tried it from clicking the x, and also File>Close, but with the same lack of success