Over 1 million tech questions and answers.

Solved: Excel VBA run after workbook name change

Q: Solved: Excel VBA run after workbook name change

Does anyone know if it is possible to have a VBA code run after a workbook's name has been changed?

RELEVANCY SCORE 200
Preferred Solution: Solved: Excel VBA run after workbook name change

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Solved: Excel VBA run after workbook name change

I was able to get what I wanted done by using the BeforeClose event.

Read other 1 answers
RELEVANCY SCORE 84

Is there a way to save a workbook if a cell within a range is changed?
 

A:Solved: Excel Macro -> Save Workbook On Cell Change

Read other 16 answers
RELEVANCY SCORE 80

Hello Everyone

I am having some difficulties finding a solution to my problem. I am hoping someone can help or lead me to the right direction.

I have a workbook called Data.xlsm, below is a sample:

ID, Name, commission
1 john 1000
2 eric 2000
3 ryan 3000

Now I have another excel file called Temp.xls which looks pretty much the same as Data.xlsm.

ID, Name, Commission
1 john 200
2 eric 300

I need a macro that will read the Temp.xls and grab the commissions and bring them to Data.xlsm. The commissions need to be summed based on ID.

The final Result on Data.xlsm should be as follows:
1 john 1200
2 eric 2300
3 ryan 3000

Any help would be greatly appreciated.

Thank you
 

A:Solved: Excel Macro - Upload Workbook value from Another Workbook based on ID

Just a quick and dirty solution

Make sure you place this in the same folder as your Temp.xlsm file and press the button

It will open Temp
update the data, if a new Id is in Temp it will add the data and set the commission values in Temp to 0 to avoid running it twice.

I hope the code explains itsefl.

Think of a macro of a step by step instrcution as you would say it out loud.
 

Read other 3 answers
RELEVANCY SCORE 70.4

Hello,
I have a master workbook with 20 worksheets. 5 worksheets in the worksbook are distributed to field reps, but the remaining 15 worksheets are not. What is the best practice for receiving the 5-worksheet workbook from the field rep and importing the data into the 20-worksheet master workbook? If I merely use Copy Sheet I am able to copy the worksheets into the master workbook but then I have to remove the pathname references in each of the copied worksheets in order to map the data in the master workbook - which is quite cumbersome. Suggestions?
 

A:Populating data from one Excel workbook to a master workbook

Hi jpirhalla, welcome to the forum.

Have you tried moving the sheets over. Dragging the sheet from the field reps back into the now-15-sheet book?
 

Read other 2 answers
RELEVANCY SCORE 68.8

I have two workbooks that I am using and I am trying to add one cell's data to another cell in another Excel workbook. It used to be as simple as beginning to "add" another cell's data(from another workbook you just migrate to the other workbook) into a different workbook. It isn't working like it used to in Excel 2003. Cant' speak of it for Excel 2007 as I never had it.

Any thoughts on why it won't work? Any way to make it work?

A:Excel 2010 - Workbook to Workbook Reference?

  
Quote: Originally Posted by Lewiedude


I have two workbooks that I am using and I am trying to add one cell's data to another cell in another Excel workbook. It used to be as simple as beginning to "add" another cell's data(from another workbook you just migrate to the other workbook) into a different workbook. It isn't working like it used to in Excel 2003. Cant' speak of it for Excel 2007 as I never had it.

Any thoughts on why it won't work? Any way to make it work?


Merging Data from Multiple Workbooks into a Summary Workbook in Excel

Looks like it's possible.

Also I would look at the DATA Tab under DATA TOOLS - CONSOLIDATE.

Read other 3 answers
RELEVANCY SCORE 66.4

Hello, advicer
I do not understand why sometime I cannot copy a range from a workbook to another workbook in EXCEL (but I can if i paste the range in the same workbook). My PC is in the network of the company using WinNT 4.1. Please help me
Many thanks
Qan
 

A:Excel: Cannot Copy from Workbook to Workbook

Read other 7 answers
RELEVANCY SCORE 66

I am having trouble changing the password for a file that shows a "reserved by...." for an Excel 2010 worksheet.
I have the current password. I just don't know how to, or where to go to change it.

thanks!
 

A:Solved: How to change password on a 'reserved by...' workbook

Hi

Check this site to see if it helps.

http://www.mrexcel.com/forum/excel-questions/313439-worksheet-reserved.html
 

Read other 2 answers
RELEVANCY SCORE 65.6

Is there a macro that can be created to move the currently opened workbook to a different folder?
 

A:Solved: Excel Macro -> Move Workbook

Just issue the save as command to save the workbook to the new location with the same or new filename and then delete the old workbook

SAVE WITH NEW NAME
Code:
Sub MoveWorkbook()

vOriginal = ActiveWorkbook.FullName

ActiveWorkbook.SaveAs ("C:\NewName.xls")

Kill (vOriginal)

End Sub
SAVE TO NEW LOCATION WITH SAME NAME
Code:
Sub MoveWorkbook()

vOriginal = ActiveWorkbook.FullName
vWB = ActiveWorkbook.Name

ActiveWorkbook.SaveAs ("C:\NewFolder\" & vWB & ".xls")

Kill (vOriginal)

End Sub
Regards,
Rollin
 

Read other 3 answers
RELEVANCY SCORE 65.6

I have created a userform within a workbook that contains a command button. The comman button on the user form is coded to open another workbook.

This all works fine. The problem is that the code behind the Workbook_Open event in the second workbook does not run.

Hoe can I get the code in the Workbook_Opem event to run when the second workbook is opened?
 

Read other answers
RELEVANCY SCORE 65.6

I have the follow code behind the ThisWorkbook_Open Event:
Code:

If Weekday(Date, 1) = 6 Then
'Do nothing
Else
ThisWorkbook.Close
End If

Is this the best way to perform this operation?

Also, if the day was not yet Friday, how would I keep the workbook from closing if I needed to open it for modifications?
 

A:Solved: Excel VBA Automatically Close Workbook

Read other 8 answers
RELEVANCY SCORE 65.6

I have an Excel workbook. What I would like to happen is find some way to open and close the workbook first thing in the morning. There is code that runs when the workbook is opened.

Does anyone know a good way to perform this operation?
 

A:Solved: Excel Open and Close Workbook

Read other 16 answers
RELEVANCY SCORE 65.6

Hi all.

As I have solved a few of our IT problems at work, I am being held as our expert...thus expected to know how to do everything the managers want done!

About 80% of our computer files are done in excel, but there are a few workbooks which contain sensitve data on our customers, so the manager wants them password protected.
I have looked at the options in excel, and tried the protection option, but that just seems to stop people from making changes...they can still access and read the file.

I don't have excel at home so I can't play around with it to find out the answer myself.

I looked at the sharing/security properties, and that seems to choose which pc the file is available to....we need it available to all 3 pcs, as we just use whichever is free, but that it can only by opened by myself and the 3 managers.

We all use one standard log-in, so I can't make it available just to certain users.

Thanks in advance!
 

A:Solved: Password protecting an Excel workbook

Read other 6 answers
RELEVANCY SCORE 65.6

Workbook Size
Using Windows 7 Ultimate 64 bit
C: Drive...873 GB free of 931 GB
Ram: 8 GB (7.9 GB Usable)
MS Excel 2007:
I have one workbook that has become very slow to Open and then to Save and then to Close.
When right clicking on the desktop icon for this workbook, I see it has 16.7 MB of data.
Takes as long as 15 seconds to open usually.
I have used the "Formula....Check Errors" and corrected any errors in the WB.
Is this too much for the system to use have?
Any suggestions?
 

A:Solved: Slow Excel 2007 Workbook

Read other 8 answers
RELEVANCY SCORE 65.6

I have a row of dates against a surname and first name in one workbook that I need to organise. For example:

Graham Mitchell 1/12/07 31/2/08 6/6/08
Sam Knowles 1/11/07 6/1/08 4/4/08

I then need to organise them in a different workbook as follows:

November December January February
Graham Mitchell 1/12/07 31/2/08
Sam Knowles 1/11/07 6/1/08

What formula would I use to look at a line of dates in a workbook and put information into the cell if the month & year are the same but leave it blank if it different??

Hope that I explained this okay. I am using Excel 2007 by the way.

Lisa92
 

A:Solved: Transferring dates from one workbook to another in Excel

Read other 7 answers
RELEVANCY SCORE 65.6

I got the below code from http://www.rondebruin.nl/copy6.htm site.

Is there anyway of modifying this code so it saves each work with a specified password?

This process is carried out every month and there are 2 lots of 242 (1 set of new account and 1 set of renewal account for loans) new workbooks created so takes an age to open them all and resave with a password.

Thanks in advance for any help.
Sub Copy_Every_Sheet_To_New_Workbook()
'Working in 97-2007
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Sourcewb As Workbook
Dim Destwb As Workbook
Dim sh As Worksheet
Dim DateString As String
Dim FolderName As String

With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With

'Copy every sheet from the workbook with this macro
Set Sourcewb = ThisWorkbook

'Create new folder to save the new files in
DateString = Format(Now, "yyyy-mm-dd hh-mm-ss")
FolderName = Sourcewb.Path & "\" & Sourcewb.Name & " " & DateString
MkDir FolderName

'Copy every visible sheet to a new workbook
For Each sh In Sourcewb.Worksheets

'If the sheet is visible then copy it to a new workbook
If sh.Visible = -1 Then
sh.Copy

'Set Destwb to the new workbook
Set Destwb = ActiveWorkbook

'Determine the Excel version and file extension/format
With Destwb
If Val(Application.Version) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143... Read more

A:Solved: EXCEL - Copy Every Sheet To New Workbook

'Save the new workbook and close it
With Destwb
.SaveAs FolderName _
& "\" & Destwb.Sheets(1).Name & FileExtStr, _
FileFormat:=FileFormatNum, Password:="xyz"
.Close False
End With

Spent some time and worked it out - lol

Added in the bold section into the save section of the code.
 

Read other 1 answers
RELEVANCY SCORE 65.2

Hello,
I work with Excel 2010 and have a series of workbooks (preop_management_AAA.xlsm, preop_management_BBB.xlsm, preop_management_CCC.xlsm) that each have a worksheet named 'Medications.' From the 'Medications' sheet, I have a macro in each which opens a common workbook named bridging.xlsm. After doing calculations in bridging.xlsm, the user returns to the workbook from which they started and proceeds to the next worksheet in the original preop_management_xxx.xlsm workbook via a macro named 'NextFromMedications.' Only one of the preop_management workbooks will be open at any one time.

I need help writing code that will call the 'NextFromMedications' macro in the open preop_management_xxx.xlsm workbook from the bridging.xlsm workbook. While the name of the macro is the same in each of those workbooks ('NextFromMedications'), the file name is variable so if I write (in bridging.xlsm) something like
Application.Run "'preop_management_AAA.xlsm'!NextFromMedications"
the macro would only work for one of my three "originating" workbooks. I am looking for a way to "generically" refer to the file name in the 'NextFromMedications' macro.

I cannot put the 'NextFromMedications' macro in my PersonalMacro workbook since these workbooks will be used by multiple users on multiple computers.

As always, I thank you in advance for your time and consideration.
 

A:Solved: Running a macro in a different open Excel workbook

Read other 10 answers
RELEVANCY SCORE 65.2

Excel problem – bottom of the workbook is off the screen.
Some workbooks, when I open them, the bottom of the sheet is off the screen and I can’t move the top of the workbook high enough to expose the bottom.
 

A:Solved: Excel problem – bottom of the workbook is off the screen

Might try setting a higher display resolution long
enough to adjust the size of the window,then
switch it back after if everything is too small.
 

Read other 3 answers
RELEVANCY SCORE 65.2

I wonder if somebody has come accross a solution for the following:
I have a workbook with quite a lot of macro's and functions (vba).
To simplify matters I use named ranges for easy reference etc.

One of these functions adds a number of cell controls with certain sheets, but when I open another workbook, I need these options deleted since they will not function there.

This works perfectly if I change to a worksheet that does not need this within the same workbook, but of course, when I open another workbook the function will not recognize the named range and throws an error (I avoid these by usin the on error ...)

My question is, is there an option or way to hardcode the workkbook's name togehether with the named range when defineing it, so that when that particular range is referred to the code 'understands' where to look for it?

Something like "My other workbook"!Range("NAMEDRANGE")

If you use Refer.Name it only refers to the sheet but not the workbook.

Thanks in advance.
 

A:Solved: VBA: Excel Referring to a named range in another workbook

Read other 16 answers
RELEVANCY SCORE 65.2

How can i print multiple worksheets in an Excell 2007 workbook. Thanks in advance.
 

A:Solved: Print multiple sheets in Excel workbook

Hi there!

Yes, you can print multiple worksheets. Just select the ones you want by clicking on the tabs at the bottom of each worksheet that you'd like (holding down Ctrl will let you select more than one, or Shift will select all sheets in between the first and last one that you click on). If you go to your Print dialog box, it should have the 'Active Sheets' radio button selected in the 'Print what' section. This will print every worksheet you've selected. Alternatively, you could select 'Entire workbook' to have every worksheet in the file print out.

Hope that helps!
 

Read other 2 answers
RELEVANCY SCORE 64.4

I'm retrieving some data from some CSV files using a macro.

Everything works fine, but it appears that just opening a file causes the entire workbook which the macro is being run from to get re-calculated, even though I'm not even changing any values (yet)!?!?

I assume it's every table value in every worksheet which uses a formula whenever I open a file (and this is in a new window)!!! As I'm opening 7 files, repeatedly calculating values unnecessarily (7 times!!!) even though doesn't appear to take much time, it's still time better spent doing something else.

The code I'm using to open the file:

Workbooks.OpenText Filename:=bk, Origin:=437, StartRow:=1 _
, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=True, _
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), Array( _
3, 2), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1)), _
TrailingMinusNumbers:=True
bk is the file reference getting passed in. Bear in mind that everything does work and I'm using Excel 2007 under XP.

Any help would be greatly appreciated.

Thanks.
 

A:Solved: Opening CSV through Excel macro causes the entire workbook to get re-calculat

Read other 13 answers
RELEVANCY SCORE 64.4

Hi Everyone

Hope someome can help me.

I currently use the following code to open a word document from within a spread sheet using a command button. The word document is in a seperate folder. I use Excel 2003.
Code:
Private Sub cmdautomateword_Click()

Set wordapp = CreateObject("word.Application")

wordapp.documents.Open "C:\Users\Home\Course Acceptance\Letter.doc"

wordapp.Visible = True

End Sub
I know very little about VBA but I now need to be able to open an existing Workbook within the same folder.

Can anyone help with the code to be able to open the existing Workbook ?

Thanks in advance

Ortz
 

A:Solved: Opening an existing workbook in Excel with a Command Button.

For simple tasks like this all you need to do is use the macro recorder and then view the code that was automatically created.
Code:
Workbooks.Open ("C:\Users\Home\Course Acceptance\Test.xls")

Rollin
 

Read other 2 answers
RELEVANCY SCORE 64.4

I have an Excel 2010 workbook (named bridging.xlsm) which can be opened from one of several other open workbooks. I am trying to write code that will re-activate the workbook (which will always have "preop_management" as part of its file name) which opened bridging.xlsm after I am finished working in bridging.xlsm.

I have found code which lists all open workbooks and copies their file paths into a worksheet in the bridging.xlsm workbook. From there, I added code which looks for the path which contains "preop_management" as part of its file name and pastes that entire path name into a cell named 'ReActivate.'

Sub ListWorkbooks()
Dim wb As Workbook
Dim j As Single

For j = 1 To Workbooks.Count
Sheets("Logs").Range("C1").Cells(j, 1) = Workbooks(j).FullName
Next j

Cells.Find(What:="preop_management", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Copy
Range("ReActivate").Select
ActiveSheet.Paste

End Sub

I am unsure of the syntax which will open the path/file which was pasted into an Excel cell. My question is, how can I use VBA to activate/re-activate the workbook named in the cell 'ReActivate?'

As always, the expertise and time of this forum's members is much appreciated.
 

A:Solved: Re-activate an Open Workbook from a List in Excel Worksheet

Hi

If the workbook is still open you cannot use the full path - just the file name and extension e.g.
Code:
Windows("File Name.xlsm").Activate
or

Code:
Workbooks("File Name.xlsm").Activate
You can change your macro to record the file name without the path with
Code:
Sheets("Logs").Cells(j, 1) = Workbooks(j).[COLOR=red][B]Name[/B][/COLOR]
Or, add it to the next column with
Code:
Sheets("Logs").Cells(j, [COLOR=red][B]2[/B][/COLOR]) = Workbooks(j).Name
but if you are always going back to the original file that opened all other files you can simply do
Code:
Workbooks(1).Activate

 

Read other 2 answers
RELEVANCY SCORE 64.4

Hi again

I don't know if this is possible or not but I'll lay it out there anyway. I have about 2000 Excel files in drive C:/Documents and Settings etc/. I have a workbook called WW Numbers.xls. I need to copy the file names only from C:\ drive into a workbook called WW Numbers.xls starting in Cell A2. For example, I have in drive C:\ the following files:

WW1.xls
WW2.xls
WW3.xls
.
.
.
WW2000.xls

In a workbook called WW Numbers I want only the file names WW1.xls, WW2.xls .....WW2000xls staring on Cell A2.

I don't want to type in all the 2000 file names so I'm wondering if there is a macro that can do that for me
 

A:Solved: Copy Excel file names from drive C to a workbook

You don't need a macro, you can use something like "FileList" http://www.jam-software.com/filelist/
You can generate a CSV with the file names in which can be opened in Excel, you might only need to insert a column to extract the file name from the full name and path
 

Read other 2 answers
RELEVANCY SCORE 63.6

Good day everyone,
I'm looking for an alternative solution for the following code:

Code:

Option Explicit
Public BooleanForClosing As Boolean
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If BooleanForClosing = False Then
MsgBox "Please using exit button"
Cancel = True
End If
End Sub

I use an Addin to control a series of files. The simple reason is that I do not want to add any vba code to these files and therefore do not want to add the above code in the Thisworkbook,

I have a working code to disable the 'X' to close Excel but am stuck with the individual workbooks, I want the user to always choose the 'Clos Active Workbook' button on my ribbon.

Any suggestions? Ideas?

Thanks.
 

A:Solved: Excel 2007 and newer: Avoid 'X"to close workbook

Read other 12 answers
RELEVANCY SCORE 63.6

I need a code that will allow the workbook to be emailed when Column A is populated by certian numbers. The numbers in column A corespond to particular email addreses. This is the code I've been working but it isn't functional.

Sub Email_Out()
If Worksheets("Sheet1").Range("A5:A200") = "190030001" Then
ActiveWorkbook.SendMail Recipients:=("[email protected]")
ElseIf Worksheets("Sheet1").Range("A5:A200") = "190450025" Then
ActiveWorkbook.SendMail Recipients:=("[email protected]")
End If
End Sub

All help is greatly appreciated!
Mikey
 

A:Solved: VBA email excel workbook based on cell values using; If Then ElseIf Please he

Read other 16 answers
RELEVANCY SCORE 63.6

I am on Vista and Ecel 2007

Everytime I open an existing work in excel it opens that workbook and a new "BOOK 1" This started after I installed aspa utilities. Can someone tell me where to go to stop the extra Book from opening each time?
 

A:Solved: Excel 2007 extra book 1 when I open an existing workbook

Read other 15 answers
RELEVANCY SCORE 63.6

I have a workbook with data for all employees in it. Once a month I need to pull out a copy (certain columns) of the employee data that meet a certain criteria and paste it into another workbook for manipulation.

pull out all rows that have 513, 535, 540, or 560 in the "dept" column and paste it into another workbook. I am attaching a sample of each workbook.

1-testing macro contains all emaployee data
2-Copy into workbook (self explainatory)

I don't write vb code, but I can definately copy, paste and do some editing. Any help would be greatly appreciated. I have been searching online post all day, but have been unable to find anything I think is similar, at least that I could understand.
 

A:Solved: copying select data meeting criteria from one excel workbook to another

Read other 11 answers
RELEVANCY SCORE 60.8

Hello,

I've been working on a certain workbook and everytime a try to save it an error occurs:

Microsoft Excel for Windows has encountered a problem and needs to close. We are sorry for the inconvenience.

AppName: excel.exe AppVer: 9.0.0.2719 ModName: excel.exe
ModVer: 9.0.0.2719 Offset: 002aa2b3

HELP !!!

Thanks

Mark R

A:Excel 2000 .. When saving a certain workbook excel crashes

Hi, try running a repair from control panel>click on MS office and run change or repair if I remmber correctly.

Read other 1 answers
RELEVANCY SCORE 59.6

I have a workbook located on \\server\servershare\type2015
file name: TYPE.xlsx

how do i write the path of the table name in my query.

Any suggestions?
Thanks.
 

Read other answers
RELEVANCY SCORE 57.6

Client has SharePoint 2010 project server.
When the user clicks on a Excel file, the file open in the browser and when the user click on "open in Excel" we receive the below message 
"To open this workbook, your computer must have a version of Microsoft Excel installed and your Web browser must support opening files directly from Excel in the browser."
Below is the browser version 


However when the same is tried/accessed through a browser deployed on a dev machine, it works normally. Below is the version of the IE on the DEV server

What is causing this to happen?
Is there any tool to check the difference between the IE settings on my Desktop and the dev box.

Satyam....

Read other answers
RELEVANCY SCORE 56.8

I have an Excel (2010) template from which I need to create separate workbooks for our range of ocean-going vessels.

Requirement 1
Upon loading the template, I need to prompt the user to enter the name of the vessel.

Requirement 2
The name must be transferred to a particular cell, probably A1, in proper case.

Requirement 3
I then wish to save the workbook using the vessel’s name, in capitals, followed by a space, a hyphen, another space and then the rest of the filename – based on the name of the template.

Example 1: name of template Record of voyage.

Example 2: name of workbook OCEAN TRAVELLER - Record of voyage.

Any thoughts?

 

Read other answers
RELEVANCY SCORE 56.8

Hi,

I am using Office 2013. I have a workbook which has to be shared. I want to protect it in a way that none of the options can be changes (like I have enabled 'track changes'. 'highlisght changes from users' etc). I do not want that someone turn off the 'track changes' option or as a matter of fact any other option.

They, however, should be able to edit the workbook. Is it possible?

I tried searching but could only see an option to protect workbook structure but noes not protect options.

-regards
 

Read other answers
RELEVANCY SCORE 56.8

My O/S is Windows Vista and I am running M/S Office 2000 Professional. In the past when using Windows XP I have been able to change which workbook opens when I open Excel. Now with Vista, I have designated 2 different workbooks to open when Excel begins however I cannot delete them form the Excel XLS folder. When I delete them, the screen shows that they are gone however when I strat Excel afterwards, they are back! How can I dlete them and install a new workbook. The standard process shown in the Excel help files is not working. Thank You.
 

A:Excel Startup Workbook

Closing duplicate...........replies here: http://forums.techguy.org/business-applications/672809-revise-excel-startup.html
 

Read other 1 answers
RELEVANCY SCORE 56.8

I have a shared workbook that when some people open it the formatting does not show the same. Example I have hidden columns, but they don't see them hidden
 

Read other answers
RELEVANCY SCORE 56.8

Howdy, kinda new here. Anyway, I've got a doozy I can't seem to figure out. We just installed dual-monitors and now Excel is coming up saying "Not enough resources to display completely." It does this even when Excel is just started, with the blank, new workbook. There doesn't seem to be any screen real-estate issues since there's now double the screenspace. Any thoughts or ideas to try would be greatly appreciated.

-Ted
 

A:Not enough resources for Excel, even with a new workbook.

Read other 13 answers
RELEVANCY SCORE 56.8

Hi there

Sometimes I click on the X to close the workbook and I accidentally press NO when the computer prompts me to save the workbook since it usually comes up in a yellow box that does not really capture my attention. This usually happens when I'm in a hurry or late at night when I'm half asleep. Is there some code that makes a message box pop up with a message that says in big bold letters "YOU FORGOT TO SAVE YOUR FILE" when I click on the X to close the workbook? If so, this will save me a lot of headackes.

Mario
 

A:Save Excel workbook.

I am no guru, however I did find this in the hep wizard of MS Excel. Hope it is of some help to you.

Save workbooks automatically as you work
On the Tools menu, click AutoSave.
If the AutoSave command is not on the Tools menu, you must install the AutoSave add-in.
How?
Select the Automatic save every check box.
In the Minutes box, enter how often you want Microsoft Excel to save workbooks.
Select any other options you want.
 

Read other 3 answers
RELEVANCY SCORE 56.8

I created an Excel workbook to monitor my investments. One of the work sheets contains a long column of currency values from an annuity investment with each row showing daily values.

Presently, I manually copy the daily value of that investment and paste it into worksheet # 2 that contains all of my investments. Worksheet # 2 daily refreshes, updates and totals all investments.

My question is this: is there a formula that would automatically copy and paste the daily annuity values from worksheet # 1 into worksheet # 2 without having to manually copy and paste? If so, could you please guide me through the steps to accomplish this?

Many thanks for your prompt attention and cooperation.
Tech Support Guy System Info Utility version 1.0.0.2
OS Version: Microsoft Windows 7 Professional, Service Pack 1, 64 bit
Processor: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz, Intel64 Family 6 Model 23 Stepping 10
Processor Count: 4
RAM: 4028 Mb
Graphics Card: NVIDIA GeForce 9800 GT, 1024 Mb
Hard Drives: C: Total - 476837 MB, Free - 414208 MB; D: Total - 114439 MB, Free - 21161 MB;
Motherboard: Intel Corporation, DG43GT
Antivirus: avast! Antivirus, Updated and Enabled

<edited by moderator (etaf) to reduce font size - not required default forum font size is adequate >
 

A:Excel investment workbook

Read other 9 answers
RELEVANCY SCORE 56.8

I have two workbooks I'm trying to combine in a VBA macro. The first excel spreadsheet is just simply a sheet of 30 columns of data and 5k rows. It adds a new row every day.

The second sheet will be the model with the macro. I would like to write a script that will use a sort of vlookup to the data sheet to pull in specific parts of the datatable instead of searching through the whole big sheet.

For example, see attached. The Model tab lets you input a date or dates in the C column and then it would have to somehow search another WORKBOOK, not within this one as the example shows (for simplicity). Any ideas would be much appreciated.
 

A:Call Excel Workbook in VBA

Read other 9 answers
RELEVANCY SCORE 56.8

When I attempted to save an Excel workbook, I couldn't because the file name had changed to a number. What should I do?
 

A:Can't Save Excel Workbook

Read other 7 answers
RELEVANCY SCORE 56.8

I write a few macros for other users, and right now I just request that they rename the workbooks each month (or however often they run it) to the same names and then offer a reminder at kick-off. Something like:
Code:
If MsgBox("Are the workbooks saved as 'Workbook_1.xlsx' and 'Workbook_2.xlsx', and are they both open?", vbYesNo) = vbNo Then
End
End If
Windows("Workbook_1.xlsx").Activate
Range("a3").Select
Etc, Etc
Otherwise, I don't know how to make changes or run actions based on workbooks whose names might change. But is there a better way? I've had some people - those least familiar with automation - forget to rename, ignore the message, and then call with problems. Perhaps there's a way, instead, that asks them to name as variables whatever the sheets are called, though this might require some hand-holding, such as a list of what workbooks are open? I don't know. I'm open to suggestions - just putting it out there.

Thanks!

Windows XP
Excel 2007
 

A:Excel VBA: Prompt for workbook?

Read other 10 answers
RELEVANCY SCORE 56.8

Hello guys.
Please guide me through building my own tool in Excel.
I need to have workbook WK 1 with macro to modify another workbook WK2 which already have macros in it.
That is my plan : WK1 should have several command buttons first is to find person by ID from WK 2 , copy entire row with persons details to WK1 list 1, another button same but copy entire row to WK1 list 2, than when both lists created, I must have third command button which will : for each person in List1 WK1 will change value in cell 1 in WK2 from none to 1 and cell 10 enters =today date, for each person in List2 WK1 will delete value in first cell of the row in WK2.

I am keep loosing the track of what would be most simple way to do those steps, WK 2 file name is changing every day with date in beginning of the name of file,
 

A:Need help Excel 2 modify other workbook

Read other 13 answers
RELEVANCY SCORE 56.8

Tech Support Guy,

I have a question regarding linking two Excel (I am using Office 2003) workbooks and varying worksheets.
Here's what I want to do, using a macro, create a link to a cell in workbook A/worksheet X to workbook B/worksheet X (where X is variable).
Now creating a link is easy, except I want the "link" itself to appear in workbook A.
I tried the following:
Workbooks("Workbook A.xls").Worksheets(Worksheet A).Cells(6, 4).Value _
= Workbooks("Workbook B.xls").Worksheets(Worksheet A).Cells(57, 3).Value
However, Excel places the value instead of the link in the cell. I want both, meaning, you see the value in the cell, but when you highlight the cell, you see the link to the 2nd workbook.

I have also tried the the following:
Workbooks("Workbook A.xls").Worksheets(Worksheet A).Cells(6, 4).Value _
= "='[Workbook B.xls] Worksheet A '!R57C3"
This gets me what I need except as I mentioned, the worksheets vary and I have not been able to figure out how to do use a variable worksheet name in this example.
I appreciate your help in solving this problem
Take care,
RJ
 

A:Excel Workbook Question

See if using the indirect function is the solution?
 

Read other 1 answers
RELEVANCY SCORE 56.8

Hi,

I am working on an Excel 2002 report. I need to be able to create a copy of the workbook, strip it down a bit (for uploading purposes), and let the user save it as he/she pleases.

Is it possible to make an active copy of a workbook without saving it?
Excel VBA help is not being very "helpful" on this matter.

Thank you,
ABentsionov
 

A:Copy Excel Workbook

Hello, welcome to the board!

It is always best if you work from a saved file. This is just generally a good idea. Is there a reason you do not want to save the workbook? You need to save to do what you want. There is a way, but it is more convuluted than just saving your file.
 

Read other 3 answers
RELEVANCY SCORE 56

I have a workbook that I want to share with many people so they can all edit at same time. When I share it, they cannot run macos, it errors out with

"Error 1004 Application defined or object defined error"

Any ideas on how to overcome this?

Thanks!
ASM
 

A:Excel - Shared Workbook Macro

The macro is supposed to create hyperlinks... is this a no no? this is excel 2007...
 

Read other 1 answers
RELEVANCY SCORE 56

This is a followup to my "Data transfer between 2 different open Apps" thread, which is now functioning...sort of. I have not found a way to access the data from the workbook which is opened in the second application. I can only reopen it from it's last saved location, which is OK, if I know that the workbook has not been changed since it was last saved. Part of what I'm doing uses a IsFileAlreadyOpen function (kernal32) as recomended to me in that thread.

QUESTION: I would like to know if an open workbook has been changed since it was last saved. This workbook is in a different app. Is there a function (perhaps kernal32) that can be called to give me the changed state of a workbook?
Thanks,
Tom
 

A:VBA Excel: Check if a workbook has been changed

Read other 7 answers
RELEVANCY SCORE 56

Hi There

I have recorded a macro that opens up a workbook from my C drive as follows:

Workbooks.Open Filename:= _
"C:\Documents and Settings\Mario Pincivero\My Documents\Homes\Salem's Point 1L 40M-2423.xls"

I also recorded a macro that opens a workbook from windows as follows:

Windows("Salem's Point 1L 40M-2423.xls").Activate

I want to combine these two macros to do the following:

If Salem's Point 1L 40M-2423.xls is aready open then do the code Windows("Salem's Point 1L 40M-2423.xls").Activate

If Salem's Point 1L 40M-2423.xls is not open then do the code Workbooks.Open Filename:= _
"C:\Documents and Settings\Mario Pincivero\My Documents\Homes\Salem's Point 1L 40M-2423.xls"

Please help

Mario
 

A:Excel Macro to open a workbook

Hi Mario,

When you say you open a workbook from your C-drive.
Are you executing your macro from within an Excel workbook or how?
What do you trigeer it with or where do you trigger it from?
 

Read other 1 answers