Run VBA On Schedule When Workbook Closed And User Logged Off

Feb 12, 2014

I'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).

View 2 Replies


ADVERTISEMENT

Schedule Macros To Run While Workbook Is Closed

Apr 14, 2007

I'm trying to look at options for scheduling macros to run at a particular time. Ideally I would like to run one at 3:00 am during every week night. From what I've looked into, I can run the OnTime procedure and it could schedule this to run each night. Does anyone know if this is correct, and if there are any other options avaliable to me?

Also, does anyone know if this can run automatically if Excel is closed, or does Excel have to be open? Does the workbook have to be open?

View 9 Replies View Related

MsgBox Tied To User Logged In

Oct 2, 2008

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 Related

Before Close Event (check User If They Logged Out?)

Jun 6, 2008

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

View 9 Replies View Related

Creates Duplicate File When Logged In As A User With Restricted Permissions On Our Network

Apr 24, 2009

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 Related

Copy Range From Closed File & Paste To Closed Workbook

Apr 26, 2008

Is there code that will take certain data from one Excel sheet to another named file in a different place on the network? Example Copy cell aa47 from "Recent Faxes.xls" that sits in "correspondence" folder. Then paste into cell B25 "Current Documentation.xls" in the "Sales Contacts" folder

View 2 Replies View Related

Schedule Workbook Open Automatically

Jan 23, 2007

Is there anyway I can schedule an excel workbook to open up at a certain time; I have some code attached to the Workbook Open function; so when the workbook is opened the code will run; but I need the workbook to automatically open at say 17:00 everyday so the code can run.

View 9 Replies View Related

Pull Data From One Closed Workbook Into Active Workbook With Command Button

Feb 27, 2014

I've been using the following code to bring in individual cell values from one closed workbook to an active one. I would like to modify this is possible to bring in multiple cells at once and also pull them into a different worksheet in the active workbook. Basically, my command button is on Sheet1 but I'd like the data to pull into a cell on Sheet2.

Private Sub CommandButton1_Click()
With Range("Q9")
.Formula = "='C:Users[Workbook Name.xlsm]Worksheet Name'! N27"
.Value = .Value
End With

View 6 Replies View Related

User Defined Function To Extract Information From Closed File

Feb 7, 2014

Herewith I attached a sample excel file.

Structure file which i attached herewith include all the cost center details. normally it is a big file contain more than 1000 cost center details. Structure File.xlsx If i want a cost center name for some cost center code, i have to open this file and find a specific name.

What i plan is develop a macro function called "CC".

If I type =CC("D232") I need to print cost center name for D232.

But the problem is i don't want to open the structure file, without open that file, when i type this function i need a result.

View 1 Replies View Related

Copy Worksheet From Closed Workbook To Current Opened Workbook

Aug 21, 2014

I have an open workbook (A) and this is where the code should reside. I want to use VBA to copy the content of an entire worksheet from a closed workbook (B) to an existing worksheet in workbook A. How would you accomplish this?

View 7 Replies View Related

Copy Data From Closed Workbook And Append In Active Workbook?

Feb 6, 2013

I have some vba that opens a closed workbook, copies data from a named range and then pastes it to the active workbook.

However, what is happening is that the closed workbook is opened and only part of the data is pasted. What I would prefer to happen is this:

Open the closed workbook-->copy the named range-->paste(append) to next empty cell in column B.

Heres the code that I have got.

Sub Workbook_test()Dim wb As Workbook
Application.ScreenUpdating = False ' turn off the screen updating
Set wb = Workbooks.Open("G:WAREHOUSEPlanningSmartNew Training Plan raining plan.xls", True, True)

[Code]....

View 5 Replies View Related

Copying EMF Object From Closed Workbook Into Open Workbook

May 27, 2014

Please see attached files.
Book1.xlsx
test.xlsm

I am trying to copy the emf image object from "Book1" into the "test" workbook whilst the test workbook is open and Book1 is closed. The code I have put together currently sort of works, I mean that it copies the text data over but does not copy the object which is what I require.

View 2 Replies View Related

Transfer Data From Open Workbook To Closed Workbook

Dec 16, 2008

im looking for some code to transfer cells a3,d6,f9,i6,k10 and i18 from open workbook named "hello"

to

closed workbook named "goodbye" and input to next available row
a3 to a1
d6 to a2
f9 to a3
i6 to a4
k10 to a5
i18 to a6

View 14 Replies View Related

Copy From Closed Workbook Then Create New Workbook

Jan 31, 2007

I've got a problem with this code, have been wracking my brains about. Here is the process I am trying to do:

1) Copy a range (a2:av1000) but (ideally) find the last populated row from a closed workbook (with a different password)
2) Create a new workbook and paste this data into it at A2
3) Close all the workbooks but only save the new one.

View 9 Replies View Related

Copy From Closed Workbook To Open Workbook

Apr 25, 2007

I'm trying to write a macro that accomplishes the following:

" Book 1" is already open. The user runs a macro that lists all .xls files in directory "d:measurements" The user selects the desired file from the list or box the macro copies from this "book 2" " sheet 3", " range A6:I107 and pastes (values only) into "book 1", "sheet 5", "range A6" End of macro.

I want to accomplish this without opening the selected file (book 2)

View 4 Replies View Related

Pull Value From Closed Workbook Where Workbook Name Is In A Cell

Nov 24, 2007

I want to open an excel file whose name is a value in a spreadsheet, and then pull a value from the spreadsheet I queried into my existing workbook. Here is the syntax i have so far:

to note: I'm calling the workbook in which the macro is located testproject.xls, and I'm using [integer].xls as my list of files that the macro will query. Ultimately, this code will go in a loop.

Set currentCell = Worksheets("Sheet1").Range("A1")
varCellvalue = currentCell.value
Workbooks.Open "path_of_file" & varCellvalue & ".xls"
Windows("testproject.xls").Activate
currentCell.Offset.(0,1).Select
ActiveCell.FormulaR1C1 = "=[3.xls]Sheet1!R1C1"

The problem is, I want [3.xls] to carry the sale value as varCellvalue with .xls appended, and not be kept static at 3. I tried inserting & varCellvalue & ".xls" into the brackets, but with no luck. My only difficulty is getting [3.xls] to vary along with varCellvalue.

View 6 Replies View Related

Sum In A Closed Workbook With VBA

Jan 1, 2009

I was wondering if there's any way to sum inside a closed workbook by usin' VBA? I think I figured out how to do it just with formulas, but I was hoping to be able to make like a macro or something to do it, 'cause its kind of time consuming having to go back and forth to all these workbooks.

View 9 Replies View Related

Max Value From Closed Workbook

Feb 22, 2008

Is there a formula or vba code that would allow me to get the max value from a column in a closed file/workbook?

View 4 Replies View Related

Prompt Open Closed Workbook Then Copy Range And Paste Special Into Open Workbook

Apr 6, 2013

I have created a spreadsheet some time ago and have been asked to improve on it but I'm rusty with VBA.

I have an automated ordering system that saves each sent order as the date e.g "05-04-2013.xls" but the management team want a graph with the data for the last 4 weeks compared. I have created a seperate workbook called "consumables report.xls" which has a column with the products listed followed by columns "Quantity" and "cost" which is repeated for the 4 weeks of the month.

I want to add a button to prompt the user to choose the saved order e.g "05-04-2013.xls" (all orders saved in same directory) to copy and paste the quantity and cost columns (c8,D69) into "consumables report.xls". I got this to work earlier but it would only paste the formulas and not the values. So I need

A prompt to open workbook
Copy range (c8,d69)
Close work sheet
Paste special .value (c8,D69)

I dont care if it has to open the workbook to copy the data as this will only be used once a month so it dosnt matter how slow the code is.

week 1 week 2 week 3 week 4
Product
quantity
cost
quantity
cost
cost
quantity
cost

1
2
3
4
5
6
7
8

View 7 Replies View Related

How To Open Closed Workbook

Apr 6, 2014

i want to open closed workbook

here is path of my workbook D:ExcelPurchasesPurchases Transactions With StockItemsVouchers - Purchase Transactions With StockItems.xlsm

i want to set this path as default

View 4 Replies View Related

Getting Data From A Closed Workbook

Feb 20, 2009

I am trying to use this code to pull data from a closed workbook. The code will be in workbook Book1 and I will be pulling information from closed workbook Book3. I need to pull data from cells A1:A4 from Book3 and place it into Book1 on Sheet2 in cells A1:A4. I receive an "Subscript out of range error" on this line of code

View 4 Replies View Related

Prevent Workbook Being Closed

Apr 2, 2009

I display a message box in Workbook before Close event.
If user click yes I shouldnt close the workbook if NO i should close the workbook.

In the Yes part, How can I stop excel from closing the workbook.
If i dont write any ocde it automatically closes in the event.

View 2 Replies View Related

Referring To Closed Workbook

Mar 31, 2007

I have the following formula to extract a specific cell from a closed workbook. It works fine. I want to be able to make the file name refer to a another cell so I can create a spinner to change it. For example:

='C:Documents and SettingsTom Desktoplabor[01_032407.xls]Stats'!A4

Cell A1 would be 01_032407, and I would replace [01_032407] with [A1]
but it does not work.

View 9 Replies View Related

COUNTIF On A Closed Workbook

May 24, 2007

I have the a COUNTIF function used on one workbook which refers to another workbook, however I get the result #value! unless the other workbook is open - this is even if I chose to update links when I fist open the file.

Do all workbooks have to be open when using COUNTIF?

If I open the other workbook after my workbook with the COUNTIFs on has been opened then all #value! errors disappear and the correwct info is shown.

View 9 Replies View Related

GetValue From Closed Workbook

Aug 15, 2008

when using the Active X Data Objects 2.8 Reference in excel 2007, i run into the problem with the GetValue function. After running the script the output sheet shows #REF! in all specified cells?!

Sub test12()
p = Location
f = file
s = "Sheet1"
For r = 1 To 150
For c = 1 To 12
a = Cells(r, c).Address
Sheets("Cars").Cells(r, c).Value = GetValue(p, f, s, a)
Next c
Next r
End Sub..........

View 9 Replies View Related

Lookup Value From Closed Workbook.

Feb 24, 2009

I have a workbook called Book1 that was created from another macro. I am attempting to do a lookup using columns B2 and C2 and look for the same values in columns G6 and J6 from a workbook called Marine Moves..If a match is found copy the value from Column H insert that value into Book1 Column A, if possible I would like the Marine Moves workbook to remain closed during this process.

View 9 Replies View Related

Copy From Closed Workbook

Jan 5, 2007

Copy From Closed Workbook

I have been trying this method for a while, I just don't know what to put where, & what names to change.

Trying to pull ranges from database.xls to cost.xls

View 3 Replies View Related

Retrieving From A Closed Workbook

Feb 6, 2007

I have tried to find how to retrieve a worksheet from a closed workbook and I am almost sure that there was an answer how to do this in FAQ but I cannot seem to find it, does anyone know where this thread is?

View 7 Replies View Related

Values From A Closed Workbook

Feb 9, 2007

I wrote here a few days ago about an issue retrieving a closed worksheets values and I got help from RoyUK(see code below and link), but for some reason the values are never entered into the open worksheet.

Retrieving From A Closed Workbook
Sub FillingSheet()
Dim filetoopen As String
Dim wb As Workbook
filetoopen = Application _
. GetOpenFilename("XL Files (*.xls), *.xls")
On Error Resume Next
Set wb = Workbooks.Open(filetoopen, True, True)
With ThisWorkbook.Worksheets(1)
. Cells.Value = wb.Worksheets(1).Cells.Value
End With
wb.Close False
Set wb = Nothing
End Sub

View 2 Replies View Related

Get Values From Closed Workbook

Oct 2, 2007

I have a master file with two sheets. I have another input file with only one sheet. Without opening the input file, is it possible to copy the range and paste special values only into a duplicate sheet in the master?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved