Auto Name Workbook
Jun 14, 2007
I have the following code in a template:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Select Case Sheet1. Range("A2")
Case Is > ""
MsgBox "Don't forget to take your medications today. Have a pleasant day, " & Sheet1.Name & "."
Case Else
MsgBox "Have a good day!"
End Select
ActiveWorkbook.Close
End Sub
When a user opens the template, Sheet1.Range("A2") is populated with today's date & Sheet1.Name becomes the user's name. How can I set this up so that the template, which is named Medical Records, is saved as a workbook named : Sheet1.Name & " Medical Records.xls"? In other words, if the user's name is Bill, I would like the workbook saved as Bill's Medical Records.
View 2 Replies
ADVERTISEMENT
Feb 5, 2013
I have a workbook (Book B) I want to take information from and Auto populate into another (Book A) if the Type e OR Type f are marked. But only need certain column information from Book B. Let me know if there are any questions I am unsure how better to exlain.
Book B.xlsxBook A.xlsx
View 1 Replies
View Related
Jan 11, 2008
I want to create a template in Excel for a change order system. Every time I have a new change order I want it to be numbered. I want Excel to automatically keep a log of all the changes orders to date with change order number, date, title, etc.
View 9 Replies
View Related
Sep 26, 2007
I am trying to get a macro to automatically email my workbook out to my distribution list. I have it working but I get a popup telling me:
"A program is trying to automatically send an email on your behalf.
Do you want to allow this?"
Is there anyway I can bypass this message? The code I am using is below:
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "mbudgell@hotmail.com"
.CC = ""
.BCC = ""
.Subject = "NAME"
.Attachments.Add ActiveWorkbook.FullName
.HTMLBody = MyHTML & "Hi,
View 9 Replies
View Related
Jan 18, 2009
Is there anyway that a workbook can be set up to close itself at a set time i.e 19.00hrs every day?
View 9 Replies
View Related
May 22, 2007
I have only one workbook in which I would like to enable auto-save. Hence, I do not need the auto-save add-in, which I've already tried. Is there some VBA code that can replicate the auto-save add-in for only one workbook? Also, I would like the default auto-save settings to save every 1 minute and NOT prompt for the save. This workbook gets completely new data every few seconds through a DDE Link, so having it save without prompting would be fine. I liked the auto-save add-in, but it reset to default settings every time the workbook was closed, I'd like to keep the same settings every time the workbook is opened.
View 5 Replies
View Related
Feb 15, 2014
How to get an automatic macro to run from my first sheet (sheet 1 of 10).
However, on my first page, users must enter 36 numbers in exact order and then those numbers need to automatically be copied to start at A3 on my following 9 sheets.
View 3 Replies
View Related
Jan 11, 2008
I have a workbook with a list of names of up to 15 people in each of 5 rows. Each row then populates a row in a separate workbook with those names. Each person is identified by a number and each person then has their own worksheet in that workbook.
Is it possible in some way to auto-name the tab for each worksheet from the number in the name cell?
View 7 Replies
View Related
Feb 11, 2013
Can I set up my workbook so that the formula Auto Calculation works on one of the sheets, but the other two sheets only calculate on saves.
I have three sheets in a workbook. 1 of the sheets is used for data entry and there are quick small visual formulas on that sheet that make data entry easier and produce mistake double checks. But the other two sheets are formula intensive and take a few minutes to calculate which is fine considering it only calculates on save. But I need to be able to have the one sheet calculate automatically while these other two are only on save.
View 1 Replies
View Related
Sep 3, 2013
I need a formula or a macro here, or something completely different. I have one spreadsheet that tracks all records that I produce. In one of the columns (F), I have indicated whether certain forms were issued with the record. This column can either contain an "x" or nothing at all. On a separate spreadsheet, I track and record the results from all these forms. I need something that will make the second spreadsheet (TrackTrend) automatically search column (F) on spreadsheet one (RecordTracking) and if "x" is found, return the information for columns (A-C) for that given line. If nothing is found, nothing should be returned.
View 3 Replies
View Related
Aug 26, 2009
If possible, Can a module be copied into a new workbook from the master workbook. When the one I have does not copy the modules when creating a new workbook. If so it would make my life a bit easier.
View 9 Replies
View Related
Feb 2, 2010
1. I have got a master sheet (Headers: First Name, Last Name, DOB, Age, Actioned Date, Query).
2. There are around 20 workbooks with the same headers.
3. All Individual workbooks are updated everyday.
4. Next day morning I need to copy paste all the values from each workbook to master sheet.
5. Thought of linking the workbooks. However, that replaces all.
6. Here is the example senario.
a. Each workbook is updated everyday.
b. Next day morning i need to copy paste all the data into master sheet with the old data.
View 9 Replies
View Related
Oct 19, 2012
Is it possible to have a code that will hide a specific sheet everytime I will close the workbook?
View 3 Replies
View Related
May 9, 2013
I have two coworkers who input a list of times spent throughout the week into a basic 5x5 grid (daysof the week x 5 employees) into their own seperate workbooks. I then take those workbooks and copy and paste them on to my own master work book. Is there any way to get their data to auto populate on to my spreadsheet?
View 3 Replies
View Related
Dec 10, 2013
The attached workbook requires users to enter a date on the SAT sheet (B3). I would like that date to always represent Saturday (the first day of our work week) Is there a formula I can use to validate if the date entered by the user corrleates to Saturday or is there a way to auto-populate the workbook with the Saturday's date?
DSR (BLANK BETA).xlsx
View 14 Replies
View Related
Sep 13, 2005
I have a worksheet with 10 columns, and an ever number of growing rows.
What I would like to do is to Sort Column 'B', along with all the
other respective data in the other columns, each time the spreadsheet
opens. I would prefer to use VBA or some other auto-launching event.
View 9 Replies
View Related
Nov 8, 2007
Is there a way to auto name sheets within a workbook by creating a list. or by a different way.
Each list will have a person name.
View 11 Replies
View Related
Dec 9, 2009
I have a 'few' workbooks that I have added some code to which auto closes the workbook if it has been inactive for more than 60 minutes.
Problem seems to be is that this doesn't envoke if a screen saver is active, does anyone have any VB code to disable the screen saver until after the workbook has closed.
View 6 Replies
View Related
Nov 6, 2012
I am using code to auto adjust screen resolution when opening a workbook so that my workbook will span that computer screen of anyone opening it.
How to taylor it specifically for each worksheet as they differ in size in terms of what cells are used??
Code:
Private Sub Workbook_Open()
Dim Vis_Rnge As Range
Dim Data_Rnge As Range
Dim X_Fact As Double
Dim Y_Fact As Double
ActiveWindow.Zoom = 100
[Code] ..........
View 1 Replies
View Related
Nov 26, 2012
I have a menu workbook with macro buttons that call different workbooks. Call the menu workbook (switchgear.xlsm). Switchgear contains 2 buttons. Button 1 closes switchgear and opens Book1. Button 2 closes switchgear and opens book 2.
If book1 is open and nothing has changed for 3 minutes I would like it to close and open switchgear.xlsm. I do not want it to just close in 3 minutes... I want it to close after 3 minutes of inactivity.
I have search all over and tried and tried to achieve this without success...
I have been able to get the timer to work but it gets caught in a loop. If I open book1 and close it in less than a min then 3 minutes later out of nowhere the code tries to run???
Secondly when this happens I see several book1 vba projects loaded in the editor window???
View 9 Replies
View Related
Dec 21, 2006
I have an excel file stored on a network drive for the purpose of information sharing. (File protected with a password)
But some the guys leave the file open for quiet long time and hence I cannot open the file for updating the data.
-I need to have a macro that runs every 5 minutes and displays an alert message saying "Please close the File" as long as the file is kept open.
-A second macro with a modified version of the above to close the file automatically after 5 minutes from file opening time after showing an alert message "You cannot leave the File Open, File is Closed Automatically!"
View 9 Replies
View Related
Aug 8, 2007
Need vba code to automatically open sheet one when a workbook is opened? At the moment it opens on the page on which the workbook was last saved.
View 9 Replies
View Related
Sep 13, 2007
I have a shared workbook where 5-6 people could be updating the log sheet at any one time. The problem is a I have a macro that I would like to run to update ( cut n paste to different sheets, etc) that doesnt like running when the workbook is shared. What I currently do is have a button that when clicked - changes the document to exclusive, runs the macro, then changes back to shared. I was hoping I could run the macro on an worksheet event? But i'd like it to run only once - Possibly when its first opened for the day by anyone of the users.
View 4 Replies
View Related
Jul 23, 2013
I have a workbook template that will have multiple tabs. I would like to have it that when you open this workbook the date populates in A1 for each tab and is static. At that point they can save with another name leaving the template intact so when you open it again (on another day) it will populate with the current date. Is this possible and if so how?
View 7 Replies
View Related
Dec 20, 2012
I have a single registration sheet that lists names, contact information, and the class someone is in on a single sheet.
(Name, Number, Email, Class 1, Class 2)
I am hoping to automatically populate other sheets in my work book based on classes... essentially making automatically populated rosters. For example, everyone who has Math listed in either Class 1 or Class 2 would have their entire row (with contact information, etc) copied to the "Math" sheet.
View 2 Replies
View Related
Jun 7, 2013
We are currently utilizing a shared workbook (yes, I've read the inherent problems with this). This workbook needs to automatically save any changes and refresh itself every minute. We are seeking an answer to this goal, perhaps utilizing VBA code ?
We have researched the forums and attempted numerous snippets of VBA code and different settings already available in Excel (ver 2010) without success. And, we have tried using the Advanced Settings (Shared Workbook / Advanced Settings (5 mins)) .... however the display of newly added data is not updated on all viewing terminals unless we close the shared workbook on those viewing terminals and then re-open.
View 14 Replies
View Related
Mar 24, 2007
I have the following code that displays a form at a user defined time and if the user does not press "Stop" then the workbook saves and closes. The user can press stop then the workbook remains open.
Here is what I have where:
Admin_Auto_Shutdown = Yes or No
Admin_Auto_Shutdown_Time = 3:34pm or user defined time (This doesn't seem to work??)
'Auto Shutdown CloseandSave
If UCase(wb.Worksheets("Admin"). Range("Admin_Auto_Shutdown").Value) = "YES" Then
Application .OnTime TimeValue("Admin_Auto_Shutdown_Time"), "AutoShutdown"
End If
Sub AutoShutdown()
Application.OnTime TimeValue("Admin_Auto_Shutdown_Time"), "AutoShutdown"
Auto_Shutdown_Form.Show
End Sub
Now, my question is about a timer that I can show on a form. When the form is displayed I would like to give the user 30 seconds to press stop (and keep the workbook open) or to press proceed and save and close or to not do anything and the workbook would close and save when the timer reaches zero.
Code for user form which is missing most everything...
Private Sub Halt_Click()
'If user whats to continue without closing
Auto_Shutdown_Form.Hide
End Sub
Private Sub Proceed_Click()
'If user whats to save and close
Auto_Shutdown_Form.Hide
How do I add a timer to this code where it will run this at the end of the timer?
Auto_Shutdown_Form.Hide
Application.DisplayAlerts = False
With ThisWorkbook
.Saved = True
.Close
End With
View 4 Replies
View Related
Apr 3, 2014
I have an Excel Workbook with Showcase Queries embedded into it.
Upon a manual open, the user is prompted to either refresh data or keep data since last save, the user then has to enter a username and password to allow the query to access the database.
Using the code below to open the workbook, no such prompts are given. Is the code overriding the prompts and automatically refreshing the data without password? [Given nature of data, visual validation of refresh is not possible]
If not, how can we code a data refresh through showcase query with user/pw req's?
[Code] ......
View 1 Replies
View Related
May 11, 2009
I have never really used VBA and so am completely stuck at this problem. I need to create a macro which auto-populates a master worksheet from the individual user sheets in a shared workbook. Sheet 1 is the master sheet "Team Stats". There will be an undetermined number of individual worksheets to accomodate new staff. Each worksheet will be identical, using columns A-I with row 1 having the headings:
Date, Name, Reference, Value, Price, Age, Purchased?, Destination, Add. Products (the last 3 columns will have a drop-down list which will be used to enter data into the cell). There will be a varying number of rows in each of the individual sheets. If possible I would like the macro to run every time data is entered into one of the individual worksheets. If this is not then it would be fien to update every time the workbook is opened.
View 5 Replies
View Related
Mar 26, 2014
I get this monthly report that has 5 tabs in it. The last tab, ALL_FAILURES_1mon, is a list of part and serial numbers that have failed that month. From that tab I copy the information into a master workbook that houses all the failures broken up by part number, each part number is a separate tab. I am wondering if there is a way to search in the "Monthly_Report" document for all rows containing the part number, 07X-000-ZZZ" and copy the entire row into the master fails list. I have attached a couple examples with sensitive information blocked out.
What I need is for when the macro is run, it will search "Monthly_Report.xlsx" ALL_FAILURES_1mon tab, for "07X-000-ZZZ" and copy all rows containing the part number and paste them in the next blank row of "Master_Fails_List" in appropriate tab.
*NOTE*I have attached both examples however my "Monthly_Report" document was too large so I had to upload it as a .xlsb but the original is .xlsx
View 9 Replies
View Related