Excel Opens Multiple Workbooks When Opening Any Workbook?
Jan 27, 2005The same two workbooks open when I open any other workbook. They also open up when I open Excel by itself.
View 9 RepliesThe same two workbooks open when I open any other workbook. They also open up when I open Excel by itself.
View 9 RepliesI have a problem, where every time I close or open any workbook, Excel prompts me to "Enable or Disable Macros" in one particular workbook, wether I have tried to open it or not. In the said workbook, I have a macro that automatically updates a pivot table upon selecting the worksheet where the pivot table resides.
The code for it is as follows:
Sub UpdateIt()
Dim iP As Integer
Application.DisplayAlerts = False
For iP = 1 To ActiveSheet.PivotTables.Count
ActiveSheet.PivotTables(iP).RefreshTable
Next
Application.DisplayAlerts = True
End Sub
Private Sub Worksheet_Activate()
Call UpdateIt
End Sub
There is something in the code that calls UpdateIt any time a workbook is opened, closed or selected.
When I open any saved Excel file the saved file opens along with a blank workbook titled "Book 1". How can I make it so when I open any saved Excel file it only opens the file I want and not a new workbook every time?
View 2 Replies View RelatedWith excel 2013 you're now able to open multiple windows or views of the same workbook. However when a workbook is saved with multiple windows open, the next user to open the spreadsheet will also open it with multiple windows. Which can be very annoying when most people work off of one window vs. multiple. Is there a way to disable saving the multiple windows or a macro to force open excel in 1 window?
View 2 Replies View RelatedI was wondering if anybody could catch an error in the following code. I have a file, let's call it a "Guide" which is opened by user and at this time this file has only one purpose - to help user choose the program. After clicking on the "Choose Program" command button, an Inputbox appears where the user types in a program. Then the code should open the file with this program and this is pretty much it. But something is not working with the code below, and I do not see anything wrong with it after looking at it for so long. It just does not do antthing. how to handle the "Choosing" option
Private Sub CmdBttn_ChooseProgram_Click()
Dim sFilename As String
On Error Goto ErrorHandler
sFilename = "Approval_" & Application.InputBox("Input Program")
Workbooks.Open Filename:="C:Documents and SettingsjsmithDesktop" & sFilename & ".xls"
ErrorHandler:
'if file name does not exist error message should display. Not defined yet
End Sub
I have three workbooks. Every workbook has 50 persons IT information. Those are CPU list, Monitor list, UPS list. I would like to create another workbook. Where all user's IT information will be available. Like X user's information required, under x information his CPU, monitor and UPS information link will be available. How to create link of the CPU, UPS monitor sheets with new workbook?
View 4 Replies View RelatedI got a master format in xl2010 to collect data, which is being circulated between my team. members fill in their respective data n mail back the file with their name attached to file name. i want to creat a macro which can copy the data from every members file to master file.
View 1 Replies View RelatedIm trying to copy multiple workbooks and just save it into only one worksheet. I have 2000 diffrent workbooks with the diffrent amount of rows, The ammount of cells is the same and it dosent change.
im working on a excel 2010
This is what i got for the moment..
Sub LoopThroughDirectory()
Dim MyFile As String[code].....
Work have just upgraded from 97 to 03 (very with the times ) and when opening multiple workbooks, 03 behaves differently.
With 97 I could select many sheets from the open window and excel would open them in alphabetical order. Now we've moved to 03, the order seems to be completely at random. It's a real pain, as the set up of the workbooks we use has everything linked together. In order to keep everything working sweet, various groups of workbooks need to be open at once. Previously it was easy to find a workbook in the task bar, but now they're scattered everywhere. We don't use a set list of workbooks - the selection we need to open varies quite a bit, but there's usually at least 20 or so.
I was wondering if you can make a popup open when a user opens a spreadsheet. I have some templates i made and users continue to make the same mistakes. I was hoping to add a form/pop so when the file was opened a popup would come up with reminders. Once they press ok they can proceed.
View 3 Replies View RelatedIn a folder called "C:myworkbooks" I have books like
John Smith_001.xls
John Smith_002.xls
John Smith_003.xls
Using only "John Smith" as an initial search parameter in need to find and open the most recently created book.
I have multiple buyers that use an Excel workbook containing several macros to perform edits on other workbooks they receive via email. Generally, they have the workbook containing the macros open, and they can double-click the workbooks they receive in the email messages to open them, and the macros are available from the "master" workbook.
Recently, however, some of the buyers have been getting new computers running Windows 8 and Office 10. Now when they have the "master" workbook open, and double-click the attached workbook in an email, (Outlook 10), the new workbook opens in a new instance of Excel, and as a result the macros are not available to run on the newly opened workbook.
The work around has been to right-click the attachment and save it to their desktop, and then use the File/Open command from the "master" to open the new file. This is a hassle and takes extra time.
I'm sure I am overlooking a setting somewhere that tells Excel to always open new workbooks using the same instance of Excel, (there are two people using the new systems that aren't having problems, and two that are), but for the life of me I can't find where to set these parameters.
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] ......
I need to combine AHK and Excel, and in this I came up with the solution to save my parameters in a file, and let the workbook autoload it when I open the workbook. To do this I need to pass a command line parameter, or working directory to the workbook, as I will be using many different work directories for this to make sense.
This is only a matter of how to execute my workbook so that the path is included (and usable) to the working directory
I have tried
..workbook-name.xlsm /p "workdir"
But it results in a "grey" version of Excel aka. Excel is open, but no workbooks are.
I have also tried
excel.exe workbook-name.xlsm /p "workdir"
But this did not work either, and is not an option as we use both 2007 and 2010 at my workplace where this is intended to be used.
I can do it very easily by using absolute paths in the Excel auto-load, but as I have explained already this is just not an option.
I want create a macro which will extract 6 values (see below) from a workbook tab called summary to an master workbook for reporting purposes. Each workbook has a unique file name e,g ACI1150.
Values on sheet SUMMARY:
A1
A2
A3
G21
G24
G26
I tried to adapt the below to get one item copied/extracted. However it would no work.
I am new to using macros
Sub GetG26s()
Dim MyDir As String, FN As String, SN As String, NR As Long
Application.ScreenUpdating = False
I have about 20 workbooks with different file names for different projects all saved in the same folder. Each workbook has about 10 worksheets and each worksheet is named in a similar fashion in each of the 20 workbooks (eg. revenue, cost, variance etc.). I want to pull out a worksheet named ' forecast' from each workbook into a master workbook so that the master workbook would contain the 20 forecast worksheets.
View 9 Replies View RelatedI currently have a password secured excel file on my departs Q drive, which everyone can access unfortunately only 1 person can edit at a time. I tried to turn it into a workbook so we could all edit it at the same time but now some of the other users can't access the file at our other buildings throughout the county. This is for excel 2010. And I did select the share workbook, and allow multiple users to edit box. everything else is unchanged.
View 3 Replies View RelatedI have a workbook with two worksheets, "Main" and "Control".
Both of them are with hidden tabs (unchecked "show sheet tabs").
On worksheet "Main" I have command button which opens worksheet "Control".
The assigned makro is: Sheets("Control").Select
The problem is: when I open "Control" and close after that the workbook, the next time when I open the workbook "Control" pops-up instead of "Main" even though I do not save it.
1. I need macro on "Main" which will allow me to open "Control".
2. Regardless I "Save" or "Don't Save" "Control" when selected and workbook is closed, to open the workbook always displaying worksheet "Main".
I use Excel 2007 (at home) & 2010 (at office).
I have a database from which I extract 5 different excel files. For arguments sake, they are called File 1, File 2 etc. Each of these workbooks will have a sheet called 'Raw Data'. These will all be save in the one directory, C:Data, for example.
I am after a macro that can copy all the data from each of the workbooks, on the sheets called 'Raw Data, however the data in each of the workbooks will vary in length and width.
The workbook which I want them copied to is called "Template" and I would like the copied data onto separate sheets in this file. If possible I would like them copied to already named sheets, for example in the "Template" file, sheets may be called "Raw Data1", "Raw Data2" etc.
I have this master file with a list of workbook names in column A on a tab called, conveniently, List. I have saved the master file in the same folder as a number of workbooks where their names match the names on the List.
What I want to do is open the files on the List and copy and move the worksheets to a new workboook. The catch for this is the following (I will use an example):
1. I have 2 workbooks called DS-100 Medicine Admin and DS-101 Medicine Wards
2. I want to take the worksheets from DS-100 and add them in a new workbook
3. Then I want to take the worksheets from DS-101 and add them to the same workbook but AFTER the DS-100 worksheets that were added in step 2
4. Then save this workbook to a folder within the original folder where the files are saved
I have the below code thus far, which opens the DS-100 workbook and copies and moves the worksheets to a new workbook. It doesn't open the DS-101 workbook though. It also saves the new workbook in My Documents rather then the SavePath.
Sub CombineMedicine()
Dim Path As String 'string variable to hold path to look through
Dim FileName As String 'temporary file name variable
Dim Master As Workbook 'this workbook
Dim rng As Range
[Code] ...........
I found a great code for copying worksheets from multiple workbooks (up to 2000 workbooks) into one new workbook. It works perfectly for 99% of the copying/merging that i do. The only issue with the code is that it only copies from the active sheet in the other workbooks. I need it to copy from a specific sheet ("Travel") in all of the workbooks that i select. I've tried many ways to edit the code to change the activesheet to "Travel" but i cannot get it to work.
Option Explicit Sub CombineDataFiles() Dim DataBook As Workbook, OutBook As Workbook Dim DataSheet As Worksheet, OutSheet As Worksheet Dim TargetFiles As FileDialog Dim MaxNumberFiles As Long, FileIdx As Long, _ LastDataRow As Long, LastDataCol As Long,
[Code]....
I need to copy multiple workbooks of similar format into one new workbook called "ZZZ.xls". I have developed the below code but I got an error :
Run-time error '1004':
Paste method of worksheet class failed.
Sub create_intransit_stock_FOR_RCP()
Dim Wk As Workbook
Dim FileToOpen As Variant, i, j, k As Integer
Dim NewWBName As String, NewWBName1 As Workbook
Dim OutFileName As String
OutFileName = "C:My_DataZZ.xls"
'On Error Resume Next
FileToOpen = Application.GetOpenFilename(FileFilter:="Microsoft excel files (*.xls), *.xls", Title:="Press CTRL Key to Select Multiple Files", MultiSelect:=True)
If IsArray(FileToOpen) Then
For i = LBound(FileToOpen) To UBound(FileToOpen)..............
I'm attempting to take a Workbook that contains 1000 Worksheets and split it into 2 separate WB's of 500 WS's each ... basically half it. This could also apply to a WB that contains less than 1000 WS's, but it is highly unlikely it will ever contain more than 1000 WS's.
I'd like each new WB created to be saved in the original path with the original filename followed by a "1", "2", "3" or "a", "b", "c", etc. For example:
Original Filename = ImpactAnalysis.xls
New Filename 1 = ImpactAnalysis (1).xls or ImpactAnalysis (a).xls
New Filename 2 = ImpactAnalysis (2).xls or ImpactAnalysis (b).xls
I've located 2 modules in the forum that are a good start, but each creates a separate WB for each WS, which is a bit cumbersome with up to 1000 WS's in the original WB.
Sub splittest()
Dim sht As Worksheet
Dim w As Worksheet
Application. ScreenUpdating = False
Application.DisplayAlerts = False
For Each sht In Worksheets
Set neww = Workbooks.Add
sht.Copy neww.Worksheets(1)
With neww .....................
I have 2 Excel templates using lookups to create customer quotations. When complete a macro is run which strips out formulas and links to data.
I would like to record certain data from the finished workbook in another workbook on the server e.g. quote number, date, customer, total value, follow up date.
Is it possible to include another macro that records data in certain named cells to a separate workbook when the file is saved?
How do I run this I can not get it to work I keep getting errors this is the way I have it for now.
Private Sub ThisWorkbook_Open()
MY_MONTH = Month(Now()) + 5
With Sheets("Master List")
.Unprotect ("123")
.Columns("A").Locked = False
.Columns("A").Hidden = True
.Columns("T:IV").Hidden = True
.Rows("265:65536").Hidden = True
.Columns("E:Q").Locked = False
.Columns("E:Q").Hidden = True
.Columns(MY_MONTH).Hidden = False
.Columns(MY_MONTH - 1).Hidden = False
.Columns(MY_MONTH - 1).Locked = True
Dim ws As Worksheet
For Each ws In Sheets([{"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC","2008","Read Me","Record"}])
With ws
.Protect ("123")
End With
Next
End Sub
Compile error: Expected End With
how to consolidate multiple workbooks into the master workbook? I need to consolidate 12 workbooks into the master workbook every month. The subsidiaries will report me their figures monthly. Hereby attached one of the subsi, "B Co" reporting package, and the master copy "XYZ Holding Co" how it look like. Hence, may I know how to write a macro so that it will auto update monthly when the subsidiaries return me their reporting package, so that I can auto update in my master copy for tab BS and tab PL.
View 6 Replies View RelatedI need to consolidate a lot of information from multiple workbooks all the workbooks are located in a folder, i am not bothered about running each one separately or a group at a time, each work book has ten sheets with each sheet in the workbook being different, it needs to add to the next blank row on each sheet.
View 1 Replies View RelatedI would like to merge multiple workbooks into a master workbook. All the individual workbooks are identical and only have 1 sheet, and I would like to append them to the master as worksheets then sum them all together. The front sheet showing the totals from all the merged ones.
View 5 Replies View RelatedI'm trying to set up an excel that will allow me to gather data from multiple workbooks and get it into one master worksheet. All of the worksheets are formatted the same way (See below)
Employee Last Name
Employee First Name
Employee Position
Employee Series Number
Departing City
Departing State
Attended Pilot Training?
We don't have the data yet so the idea is to paste this information into their perspective worksheets and then have them automatically populate into the master tab.
At our small firm, each staff member keeps a small excel spread sheet on the network that contains their "work in progress." This spreadsheet is roughly six columns wide and roughly twenty lines long.
What I am attempting to do is have one "master" spreadsheet with a tab for each staff member that links their "work in progress" so that partners and managers can easily see how much work each of the fifteen or so staff members have.
I can create fifteen different tabs and fifteen different files on the network and link =[Staff1.xlsx]Sheet1!$A$1:$G$25 =[Staff2.xlsx]Sheet1!$A$1:$G$25 =[Staff3.xlsx]Sheet1!$A$1:$G$25 and so on.
If I make a change to the layout of the work in progress sheet, I have to delete and copy the file fifteen times, then go back through and re-link fifteen tabs to fifteen workbooks in order to keep it uniform.