Save Options, Opening Work Books

Feb 13, 2007

Firstly... using VBA i'd like to disable any save function to everyone other then me and a colleague on a spreadsheet (The one below).... Is it possible that just the two of us will have the ability to save and no other user?

Secondly... On opening one work book... in this case "Productivity Test" i'd like it to simultaneously open "Productivity Test Back End" both saved in P:MI TeamNew Prod with the back end remaining locked totally.

The reason behind this is these two spread sheet's are linked via sums, productivity test uses the back end as a kind of data source so i'd like "Productivity Test Back End" locked so they cannot see it/amend it..

Maybe i could use a bit of code that updates the link everytime something is used as opposed to having the back end open at all...? What do you think?

The last thing, i have alot of macros that run quickly on my PC, if my manager opens productivity test and uses the spread sheet it appears to run alot slower.

There are alot of tables in Productivity Test that are hidden and only appear when needed while everything else remains hidden. The example below is one buttons code..


ub Selectdsrtablenew()

'Select the correct table for users to view DSR detail'

Application.ScreenUpdating = False
Rows("23").Select
Selection.EntireRow.Hidden = False
Rows("26").Select
Selection.EntireRow.Hidden = False
Rows("36").Select
Selection.EntireRow.Hidden = True
Rows("47").Select

Is there any way of stream lining the code here to make it smoother as it appears quite a few times in the report for different buttons.. Maybe defining table names?

View 9 Replies


ADVERTISEMENT

Code To Work On Some Sheets Only Across All The Books

Nov 14, 2006

I use a code to work on all the sheets across all the files. But now I want the code work only on sheet named Paid across all the files.

Sub PP()
Dim wb As Workbook
Dim ws As Worksheet
Dim varWBnames As Variant
Dim varItem As Variant

varWBnames = Array("Book4.xls", "Book5.xls", "Book6.xls")

For Each varItem In varWBnames
Set wb = Workbooks(varItem)

For Each ws In wb.Worksheets
ws.Activate
ws.Range("A1").Formula = "=A2+A3"
Next ws
Next varItem
End Sub

View 9 Replies View Related

Minimize Windows And Allow Other Excel Work Books To Open

Apr 30, 2012

I have created a userform template and is working fine, the problem is the users are not able to minimize the template nor open any other excel files.

How to allow the template to open any other excel files or macro enabled files and also to minimize the windows.

View 1 Replies View Related

Copying VB To Multiple Sheets In Multiple Work Books

Mar 6, 2007

Ive put some sheet code together that i need copied to 12 sheets (jan to December) in 24 workbooks (each workbook has trhe same sheet names). I dont want to alter the actual content of the Excel sheets, I just need to copy VB code from a template (in VB editor) to the 12 sheets in each of the workbooks. Is this possible to do with VB or do i need some other utility since Im using the VB editor....

View 9 Replies View Related

Remove All Save Options From Just One Workbook

Apr 21, 2009

I have a save button running a macro that validates before saving. Is there a way to remove all other save options (alt f a, ctrl s, the toolbar save button, etc.) but just from this one workbook?

A while ago I tried playing with a code that did this but it did it through out excel.

View 8 Replies View Related

Workbook Save/Reset Options ?

Jan 16, 2010

I have an Excel 2007 Workbook that has a variety of different reports. Im trying to find a way that will allow me to reset reports back to original setting after the report has been completed. Sometimes a report may take a couple days to complete, so closing and saving is a must. Any thoughts how I may achieve this.

View 9 Replies View Related

How To Work With Workbooks Without Opening Them

Apr 26, 2012

I am making a macro and I need to extract some data from workbooks. However, I have many workbooks and it would take time to the macro to open and analyze each of them.... is it possible to work with workbooks without opening them?????

For instance, I need to open a workbook and get all rows that contain the word HEXXX..... However, I have about 30 workbooks and it would take forever...

View 2 Replies View Related

Save As Message Box On Opening?

Apr 28, 2014

I have a spreadsheet saved. Its a report with formulas in. I have saved this as a master copy and when opening you can only open in read only or enter a password to open to edit. The report is produced monthly, so each moth the master is opened and the user has to save the ss with a new file name.

I want to put VBA code so that when a they open the ss in read only. a popup box appears asking to them to "Save the Report Now" with a save as button. This would then open the Save As window

View 2 Replies View Related

Auto Save During Opening

Nov 17, 2008

I have attached a code that prompt the user for a store # then that number would automatically copy to cell A1 and at the same time it saves the file name as what is copied to A1.

This is a good code but the problem is when the file is closed and re-open, it prompts the user again for a store number and when you select 'Cancel' it replaces the store# already stored in cell A1.

What I am trying to accomplish:

1- When the file is re-opened, it should detect cell A1, if it's empty prompt user for store #, if it's not empty skip the prompt screen.


Private Sub Workbook_Open()
var1 = InputBox("store#")
Range("a1") = var1
var1_filename = var1 & ".xls"
ActiveWorkbook.SaveAs Filename:=var1_filename
End Sub

View 9 Replies View Related

How To Save Excel Cell Value Using Today On Opening Next Day

Jan 28, 2014

I have a cell using formula

IF(TRUNC(B1)=TRUNC(TODAY()),VLOOKUP(Sheet1!A2,Sheet2!A:D,4,FALSE),"novalue")

Wherein I compare cell B1 containg a date value with current system date and if it is true i lookup a value from another sheet.

My problem is next day when i open the excel the previous days value is getting erased as my if logic is returning false.

Is there any way to freeze my previous days value while opening the excel the next day

day 27 i have this value
drugcode27-01-201428-01-201429-01-2014
AA0011

day 28 when i open the excel it shows'
drugcode27-01-201428-01-201429-01-2014
AA001novalue1

I want to freeze the value under date 27-01-2014

View 7 Replies View Related

Save Listbox Selection And Repopulate Selections When Opening Workbook?

Apr 15, 2014

I have a workbook that has 2 worksheets (Sheet1 and Sheet2). Each sheet has 2 checkboxes and a listbox that has 6 columns. Everything works great until I save and close the workbook. When I reopen, all the selections for the listboxes are gone, however the checkboxes are checked as expected. Why aren't the listbox selections being saved? How do I get them to save? I found something similar in a previous post but it referred to a userform which I am not using.

View 6 Replies View Related

Macro Not Working Except In One Tab, Must Save And Reopen To Work In Others.

Oct 17, 2009

I have a wierd issue. I have this macro for a workbook i use and if i run the macro in the first tab it runs and works fine. When i select the other tab and run it it gives me a debug error. If i close the worksheet save it and reopen it and run it in the other tab it runs fine.

So in otherwords i have to run the macro in the tab desired, save it , and always close and reopen the file to run it in the other tabs. I know the code is correct because it runs flawlessly without errors but i must be missing something.

Also i currently have the macro to run on the active tab/worksheet. Can i have it run on multiple tabs? i have 15 20 and 30 tabs in this example file but in my real file i have many more milage intervals ( some tabs i would not want to select ). It gets tedious having to select one tab at a time, run the macro, rinse and repeat.

For Example Run Macro First, in the first tab. It works perfectly. Go to the second tab and run the first macro. It gives a debug error. If you save the file and reopen it and go to teh second tab and run the macro again it works.

View 8 Replies View Related

Save Work Book In 2 Separate Directories

Apr 5, 2007

I have a fluid document that I have to save for historical reasons in 2 separate directories. My save Macro works I was just wondering if anyone see's a better way of accomplishing saving to two separate directories then closing the document. I used the record function to gernerate most of the code.

Sub SAVEANDEXITTHESLATE()
Dim date1
Dim date2
Dim xlCalc As XlCalculation
xlCalc = Application.Calculation
Application.Calculation = xlCalculationManual
On Error Goto CalcBack
Application.ScreenUpdating = False
date1 = Now()
date2 = Format(date1, "mmm d yyyy hh mm")
ActiveWorkbook.SAVE
Application.DisplayAlerts = False
ChDir "c:Documents and SettingsmeDesktop"
ActiveWorkbook.SaveAs Filename:= _...................

View 5 Replies View Related

Hyperlinks Won't Work When Save File To Another Location On Computer

Jan 8, 2014

I've created a spreadsheet of clients and info; I want each client name to link to their specific folder on my computer for easy referencing. I entered in all the links and they work just fine; however, when i tried to save the file to another location on my computer so it could be used by another employee (same terminal, etc, just in another folder) the hyperlinks stopped working.

View 5 Replies View Related

Custom Ribbon Menus Don't Work Until Save, Close & Re-Open

Feb 15, 2010

Created a new tab and menu buttons on the Ribbon in Excel in 3 separate .xltm files. Everything worked great through all of the development and testing, but when we went live we got reports of a bug. Here is what is happening...

User opens the template file and immediately saves it as a .xlsm file with a new name in a new location. The user then does various amounts of work in the file. When the user needs to use one of the tools on the custom tab, it is as if the buttons are inactive or not associated with any actions. The tab and buttons are all visible, the animation of the button being pressed works when any of the buttons are clicked, but nothing happens. The user can close and reopen the file and the ribbon buttons will work correctly, but not until they close and reopen.

Upon digging into the problem, we found that if the user clicks on the custom tab before they save the file, all of the buttons will work correctly after the save. But if the tab is not activated before the save, they dont work until a close and reopen.

The XML code is good because if I place it in a add on file (.xlam) and trigger it from the main file, there is no problem. But this is not a good solution since the add on file needs to be located in the same file that the main file is run from which can be any number of places.

View 3 Replies View Related

Link Books Together?

Jan 19, 2010

I have 4 workbooks that I want to link together. The first three are exactly the same as each other in the setup, cell size ect, ect. The forth book or "book4" is the book that I want link to the other three books. I am planing on using a countif formula to add up certain symbols in designated cell ranges. Eg, Make a formula in Book 4, cell B4 to count all the black triangle symbols "" in the cell range B6 to B35 in Book1, Book2 and Book3 on each work sheet (There is 31 work sheets which represents a work sheet for each day of the month). If I can just get the formula for doing this I can aply it to everything else.

One last question, these 4 books that will be linked togther are used for each month. So every month I save them under a that months name, but if I have the books linked I will always have to keep updateding the formulas in book4 b/c it will still have the formulas for the previous month. Is there a better way to setup what I want to do or will I just have to keep changing the formulas each month as I update?

View 4 Replies View Related

Function Between 2 Books

Jun 8, 2008

I am creating a new Excel sheet in a new Book, and I want to reference another cell in another Excel Book. OK I know how to do this.
But I want the following cells to "Automatically" get the corresponding cell values from the other Excel Book Sheet.

For example if cell B1 from Book2-Sheet5 gets the value of cell A7 in Book1-Sheet2, and B2 gets that of A8.... I want the following ones to get the corresponding values (B3 gets that of A9 and B4 gets that of A10, ETC...)

View 9 Replies View Related

Two Books Update Each Other With VLookup VBA?

Mar 2, 2014

There are two books.First one is called Masterbook. This mah many formule, however in column 6,7,8 there are no formule.

Second book is called updatedbook.

This is linked with master book.

Therefore if masterbook cells are changed, the updatedbook be updated.

Is it possible if I change any value in column 6,7,8 of updated book , will automatically update the column 6,7,8 of master book by vlookup / vba.

View 2 Replies View Related

Referencing Other Books Without Having To Open Them

May 15, 2007

Is there a way to reference a cel in another file without having Excel ask you to "update your location" for each one?

View 9 Replies View Related

Save Data From One Workbook To Another Without Opening Workbook

Mar 1, 2013

I have a spreadsheet that data gets exported to from a software program. There is information such as customer name, part number, inquiry number, etc that I'd like to use to develop a log of all my estimates I create for parts. I'd like excel to take the cells I select and insert them into certain cells in the other workbook and automatically save that workbook. This will create a log of all my estimates where I can then link the full estimate to the log. The information will have to go in the next available row. Is there any way I can accomplish this without having to open the other workbook and save the work book each time?

View 1 Replies View Related

Importing 4 Sheets From 4 Books To A Sheet In Another Workbook

Apr 8, 2009

I have a workbook called summary with a sheet called "detail" I have 4 workbooks Called week 1, week 2, week 3 and week 4. All the week workbooks have a sheet called Summary. I need to import the summary sheets from each week workbook into the the detail sheet. All workbooks are in the same folder. I need to only copy columns A,D,F,G.

If someone can post code or point me towards a thread I can figure what changes need to be made. I am getting better but slowly!

View 9 Replies View Related

Copy Rows From One Book To Multiple Books And Sheets

Nov 16, 2009

I'm trying to copy rows from one workbook that is exported from access to multiple worksheets in multiple workbooks. I used a macro I found here from JBeaucaire that will copy the data for me but it over writes the information I have in rows 1-3 and also the rows below, 28-35.

Is there a way to copy the data without loosing the information in the first three rows and the rows below where the data goes?

View 6 Replies View Related

Xfer Data B/w Books W/ One Book Having Differ File Name

Apr 8, 2008

I'm transferring data from one workbook to another. The first workbook ('Request Form') will always have a different file name depending on which user is saving it. However, the worksheet within that book will always have the same name ('Tab A'). Workbook and worksheet 2 ('PTS' and '2008' respectively) will remain the same.

Basically I want the macro to open 'Request Form' (whatever the name, wherever it's saved) and stay open as the rest of the macro runs. I need that file name to be a sort of wildcard, since the file path and file name will never be the same. How can I do this?

Dim TabA As Worksheets
Application.GetOpenFilename
Application.ScreenUpdating = False
Set wbOpen = Workbooks.Open("Request Form.xls") --THIS NEEDS TO BE A WILDCARD
'Declares the ClientName
Sheets("TabA").Select

View 9 Replies View Related

Repeated Task, Moving Informatin Between Works Books

Jun 14, 2006

I have string of tasks I need to automate so that they can repeat hundreds, maybe more than a thousand times. I have no experience with VBA, but I was looking through the VBA/Excel book published by this site and have been creating and adjusting enough macros for the last few days trying to figure this out. I have figured out the basic language and can follow simple instructions (big words scare me). Here are the tasks I am trying to automate:

1. I need to take a six digit string of numbers from one cell in what I have named The Primary work book.

2. Take those numbers and tack it on to the end of a file name (i.e. c:FileOtherStuffThisIsWhereOurNumberGoes).

3. Open the file, open the excel file within the file (which will also have a name using the same six digit number as before and maybe one other word/phrase, like rating or rating benefits).

4. Then in that workbook I need to go to the second page and take the result of one formula from a cell which will probably be the same cells (i.e. E8) in every file and paste that information in the appropriate columns in The Primary work book.

5. Repeat Step 4 in the same file, on the same page of the same work book, except one cell down (i.e. E9), which is also the result of a formula.

6. Back in the Primary Work book, we go back to the place where we started and go down one cell and the process repeats and repeats and repeats.

View 2 Replies View Related

Copying Rows From Multiple Books To One Book Based On Condition?

Jul 27, 2012

I have eight sheets that have lists of questions in, which I want to copy across to a results sheet if the answer to a question is 'Yes'. Each question takes up rows B:H inclusive, and I would want to copy them to rows B:H in the results sheet. The "Yes" value will be found in column F of each row.

How can I set up a macro to copy the entire rows (without formatting) into a results sheet properly? I've tried every solution I can find but always hit a roadblock somewhere.

Ideally I would like to have a 'populate' button on the results sheet that would find every question that was answered 'yes' across the eight survey sheets and import them into results sheet.

View 2 Replies View Related

Opening A File Without Opening A Workbook

Apr 17, 2007

I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.

This is the path:
[url]

So the command is this:
Workbooks.Open [url]

Links are not actual links

So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.

View 9 Replies View Related

Work Out A Formula For My Spreadsheet Which I Use To Work Out Cutting Lists For Timber Frames

Jan 11, 2009

i need to work out a formula for my spreadsheet which I use to work out cutting lists for timber frames. I need it to work out if the width of a job is for eg 2400mm i need to work out how many timber studs I need so the space between each stud is between 400mm and 500mm and this will need to work for a range of different sizes of frames. I have it written at the moment and it just devides the width by 400 and gives me a amount of studs but it would work much better if it could space them between 400 & 500.

View 4 Replies View Related

Work Accurately With Times To Calculate The Work Progress Of The People In The Workshop

Mar 3, 2009

In a project i am compiling i need to work accurately with times to calculate the work progress of the people in the workshop thus....here goes....

I have in work book #1 (7) sheets mon to fri + complete week + a sheet where all job numbers are collected.

From monday to friday the workmen log their times as a start time and a end time. This has to be then calculated to a total hours:mins spent per job, wich in turn then has to be calculated to a total hours:mins spent per day. And the on the complete week sheet recalculated as a total time worked per week.

View 9 Replies View Related

Macro To Pull Same Cell Range Cell From Many Closed Books

Feb 26, 2009

I have many workbooks which all have a summary sheet called summary, and which are all kept in the same folder (although this folder name/filepath may change from year to year).

I want to be able to set up the column headings and then copy the same set of summary information from each book so that it can then be used for analysis. The cells to be copies derive their value from formulae, it is the value that needs to be copied.

I attach a workbook with the format needed and the source cells. The source sheet will be password protected.

I know this is a question that has been raised before and I have searched the forum but not come across a question that is close enough to work from - my VB skills are appalling.

View 14 Replies View Related

Combine Multiple Sheets From Multiple Books Into One

Aug 20, 2009

I have 6 spreadsheets all within the same folder, these are pretty much identical (rows, colums, sheets within them) apart from the names of the files.

I then have a master spreadsheet within the same folder where I want to combine all the data, from all the sheets within each book (if that makes sense!) apart from the data on the last sheet within each book as this is the reference data, onto one sheet within this master file. If possible I only want to copy rows accross which have complete data too.

So: (names not correct)
From book1.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
From book2.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
combine onto masterfile.xls on sheet1.

I have searched on here and can only find how to do it with the first sheet in each workbook, not looping through all the sheets in each book. Please see below.

View 9 Replies View Related







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