Add A Second Sheet To Workbook Named "SetUp"

May 27, 2008

I have a "Menu" workbook that has 1 sheet named "MyMenu" which only has macros and Hyperlinks on it.

I would like to add a second sheet to this workbook named "SetUp".

Next, as an example, I would have the user list 20 Excel Workbook.xls files on the 2nd sheet (SetUp sheet) in Cells A1 thru A20 (as my example). In column B, directly adjacent to each file, they would enter a generic name of their choice, representing each file. These are files that they would be using frequently. The file names would be entered in cells B1 thru B20.

Now, I need 20 macros on "MyMenu" that can open these appropriate files listed on the SetUp sheet. As an example, I could have 20 macros that are located in Column D on "MyMenu". They could be located in cells D5 thru D24.

2 Things I want these macros to do . . .
First . . .
The Generic name would be displayed in the appropriate cell in column D so that the user would know which workbook they are going to open.

And Second . . .
Clicking on the Generic name would open the associated file.

NOTE: If the user were to enter a new file name in one of the cells in column A and a new Generic name, the name for the macro on "MyMenu" would automatically be changed and the new file name would be opened when the macro was clicked.

RE-STATED:
What I am looking for is a way of running macros from "MyMenu" sheet by clicking on any paticular macro I want to run just like normal . . . but, I want the macro on "MyMenu" to open the file that is listed in column A of the SetUp sheet.

REASON:
"MyMenu" has to be a locked sheet. Therefore, the user can not enter or change macros on "MyMenu". I actually have 5 or 6 macros that I would like them to be able to change, but again, "MyMenu" has to be "Password" protected. Additionally, many of the users simply don't know anything about macros or hyperlinks

View 14 Replies


ADVERTISEMENT

Save Workbook In Folder & Sheet Named In Cells

Aug 23, 2007

What is the code to automatically save the new template worksheet in a folder and name defined in a couple of cells.

The folder name will be always be: "Q:AssetsCustomersfolder name"

I need the folder name to come from cell C3 on the spreadsheet and the filename to come from cell R3.

View 2 Replies View Related

Copy Page Setup From One Workbook To Another?

May 18, 2009

Is there a way to copy page setup settings from one workbook to another in VBA?

Example, I have a spreadsheet with 5 tabs with each of them different page setup options.

I have a second spreadsheet with 5 tabs where I need to make the page setup the same for each tab as the saved spreadsheet #1.

Background: This is a workaround for not being able to do copy/paste special values for pivot tables. My workaround is to save an .xlsx as a .mht then reopen and save as .xlsx. The only problem is that I lose page setups through the process.

View 4 Replies View Related

Copy Page Setup From One Workbook To Another

May 18, 2009

Is there a way to copy page setup settings from one workbook to another in VBA?

Example, I have a spreadsheet with 5 tabs with each of them different page setup options.

I have a second spreadsheet with 5 tabs where I need to make the page setup the same for each tab as the saved spreadsheet #1.

Background: This is a workaround for not being able to do copy/paste special values for pivot tables. My workaround is to save an .xlsx as a .mht then reopen and save as .xlsx.

View 2 Replies View Related

Changing Page Setup In Another Workbook

Jul 22, 2006

can anyone show me the way to run a macro when visual basic editor opens

View 5 Replies View Related

Copy Page Setup Settings From One Workbook To Another?

Apr 8, 2008

I generate several reports, all saved as seperate files, with the same page settings (margins, headers, footers, etc.). Is there any way to copy these page settings from one file to another so that I don't have to enter the settings seperately for each file?

View 13 Replies View Related

Changing Page Setup For Multiple Worksheets In Workbook?

Mar 7, 2006

I am trying to change the page set up setiings to fit to 1 page for 56 worksheets within a workbook.

View 7 Replies View Related

How To Setup Sheet Protection

Nov 27, 2012

When I protect the entire sheet, I can click in a cell and see what's in it, when I protect just a portion of the sheet, I can only click in the unprotected cells. Is this an Excel thing, or am I doing something wrong when protecting? I would like to see what the formula is in the cell when protected, but I can't click on the cell, what's the deal?

View 8 Replies View Related

Add Dynamically Vertical Line To Chart Without User Intervention After Initial Setup Of Workbook?

Mar 21, 2014

I am trying to add a vertical line dynamically to a chart. What I mean is I have a chart that will have a line type chart on it and I want to add a vertical line to it based on the output of one cell in that same workbook. I am making this workbook for use by end-users so I can't ask the end-users to make a bunch of modifications to the sheet or or chart. What I do has to just work when they use the workbook.

The line chart has an X axis of time and a Y axis of items sorted. (This is the part of the chart I have done already.) I want to add a vertical line fed from a cell which will have a time fed from a cell on the workbook. For example the line chart goes from 9:00 to 16:00 and the vertical line might be at 13:00. The cell feeding the vertical line is subject to change based on the other inputs on the workbook so that's why I say the vertical line has to be dynamic as the vertical line could be anywhere between 9:00 to 16:00 or it might even be that I can't place the vertical line because the feeding cell is outside the range of 9:00 to 16:00.

I have seen a number of ways to do this but none that are dynamic and automatic and don't require end user to adjust the workbook to make the vertical line at the correct on the time scale.

View 2 Replies View Related

Excel 2010 :: Paste Link Chart From One Sheet Of Workbook To Another Sheet Of The Same Workbook

Jul 20, 2014

I've created a chart in sheet 1 in a workbook. I want to copy and paste that chart into another sheet (lets take sheet 2) of the same workbook. I am using Excel 2010 version.

Whenever, I try to copy a graph and want to do "Paste Special as Link picture". The problem I am facing as "Paste Link" option is inactive.

I am attaching the Excel for your reference.

View 2 Replies View Related

Unhide Sheet Based On Named Range In That Sheet

May 6, 2012

Is there any way (in vba code) to unhide the sheet of a given named range?

If would come before the following line of code whee CurReference is already defined

Application.Goto Reference:=CurReference

View 1 Replies View Related

How To Change Named Sheet To Active Sheet (VBA)

Jul 19, 2012

How do i change the below code to not reference a named sheet but the active sheet.

In case you need it i'm trying to sort columns A:CQ on row 2 smallest to largest from left to right.

Code:
Sub Sort_Left_Right()
' Sort_Left_Right Macro
Columns("A:CQ").Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A2:CQ2") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal

[Code ..........

View 3 Replies View Related

Designating A Workbook Named ######

Apr 11, 2009

I get sent a spreadsheet on a daily basis and the naming convention is the date, the format is like DDMMYY.xls. I'm trying to set this as a DIM.

I've scanned other threads and I am trying to incorporate what what I've seen, but because I'm not sure what I'm doing I think I have it slightly wrong. (I've also just thrown in too much code I think).

View 28 Replies View Related

Named Ranges In Workbook

Feb 2, 2009

I have got a named range, which gives me a list of all the students. I would like to put that data returned in named range in excell workbook.

For example:
named range called "Students" is getting populated from A1:A10 with values:
Student1
Student2
Student3
Student4
Student5
Student6
Student7
Student8
Student9
Student10

I would like to put this data in other worksheet.

and instead of putting all the students, it just puts only
Student7
Student8
Student9
Student10

I entered in named range name ("students") in all cells I wanted to put data in.

View 9 Replies View Related

Copying Data From One Workbook Sheet To Another Workbook Sheet Without Overwriting

Jul 1, 2014

The two sheets are...

1. Sheet1.xlsx (regular excel sheet as the extension is .xlsx)

2. Consolidated.xlsm (macro enabled sheet as its extension is .xlsm)

1. Copy both the files on your system under a particular folder.

2. Now make 9 replica's of Sheet1.xlsx and name them as Sheet2, Sheet3, Sheet4, .......... Sheet10

3. Open the sheet Consolidated.xlsm and see the button i have added called "Pull Data".

Now write down the code by adding a Module in that excel sheet from the code window.

4. Write a code that will open each of these sheets (Sheet1, Sheet2, Sheet3, Sheet4, .......... so on) one at a time and will copy the data from these sheets to the Consolidated.xlsm sheet.

5. Make sure that the data is appended(and not overwritten) from the multiple sheets (Sheet1, Sheet2, Sheet3). that is once you paste the data from sheet1 to Consolidated.xlsm then the Sheet2 data will be pasted at the end and after that sheet3 data will be pasted and so on..

6. In this way at the end we will have all the data from Sheet1, Sheet2, Sheet3...in the consolidated sheet.

7. The Division column in the Consolidated sheet will have the value of first row in these multiple sheets. So after making the replicas of Sheet1, please change the value in first row (Range A1) to any other value to avoid the confusion.

8. I have highlighted the data for two sheets in yellow and grey color in the consolidated sheet.

View 8 Replies View Related

Copy Named Range From Another Workbook

Dec 27, 2009

In my project I have two workbooks. I am working on getting one to pull data from another depending on which employee is selected from a drop down list.

TestLOG.xls contains a worksheet for each employee, with named sections within for various training the employee has, and down each row has information on the date this was received, initial, recurrent, etc. It is only this single worksheet for each employee that any data entry occurs, which makes things a lot more organized and efficient.
TestFORMS.xls is the workbook accessed by the records department which has different worksheets depending on what data is to be presented. When an employees name is selected, I need the form to pull the specific data from another workbook, and post it on the current worksheet. This get repeated a couple times to fill the adjacent columns of data. I can't just select the whole table from the other workbook because in this current worksheet for example, only specific columns are pulled from the other workbook.

To better explain the flow...
Current workbook is TestFORMS.xls
Current sheet is Test
Closed workbook is TestLOG.xls

In TestFORMS, sheet Test, when named cell Employee is selected with a value...
Then open TestLOG in the background and open sheet of same name as Employee, and cope range ACtype.
Back in TestFORMS, sheet Test, paste the ACtype data in the range named Type.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Ename As String
Ename = Range("Employee").Value
If IsEmpty(Ename) Then Exit Sub
Workbooks("TestLOG.xls").Sheets(Ename).Range("ACtype").Select
Selection.Copy
Workbooks("TestFORMS.xls").Sheets("Test").Activate
Range("Type").PasteSpecial Paste:=xlPasteValues
End Sub


Within the same sub, I would add additional lines of code to copy and paste the other ranges needed on the current worksheet.
My current hangup is that I get an error at Range("ACtype") as that is not the proper way to call the range.
There's more work to be done with the macro yet, like having it pull the data with TestLOG closed, which I believe is done by listing the path to filename.
Then I need to maintain cell formatting on the new table when the data is posted to it.
Hopefully the final task is to get this working so that when a new employee is selected in TestFORMS, the previous employees data is cut and the new posted, as the worksheet is just printed out for each employee and put on hardfile.

View 9 Replies View Related

Use Named Range From Another Workbook In Formula

Aug 19, 2006

I have two spreadsheets. The sourse spreadsheet already has many named ranges which i would like to use for the main spreadsheet to pick up its information. Is there an easy way when using vlookup or the like to name the range in the other spreadsheet?

View 5 Replies View Related

Export Named Ranges Into New Workbook

Jun 7, 2008

I would like to know if their is a way to export about 100 Named Ranges from 1 workbook to another. I work with about 20 pricing templates and have just been tasked to start tracking about 100 of the fields out of each template. I named about 100 ranges on one of the templates and want to name those same fields on the other templates with the same names so I can build a macro to just pull all of those ranges from the different templates into a metric tracking workbook. My question is if there is a way to name those same ranges on the other workbooks w/o doing it manually. If I copy and paste or copy the worksheets from one book to another I will spend just as much time deleting links from the other workbook as well as updating the contract information.

All of the Ranges are Sheets that are named exactly the same and in the same exact cells on each sheet.

View 3 Replies View Related

Calling Named Range From External Workbook

Jun 12, 2009

I want to copy a named range from an external workbook. Currently I am using some VBA copied from a recorded macro that first opend the 2nd workbook and then selects the named range, changes back to the original workbook and drops the copied range into the active workbook.

I would like to find a way to get around having to open the reference workbook, and instead simply point to the proper workbook name and named range.

View 3 Replies View Related

Copy Sheets From Another Workbook Without Named Ranges

Nov 16, 2009

I have VBA code that copies over several sheets from a workbook, but I'd rather not have all the named ranges come through. Whenever I run the macro it gives me this notice: "A formula or sheet you want to move or copy contains the name 'rngRegion2', which already exists on the destination worksheet..." The destination sheet doesn't originally have this range already, it runs into problems because the sheets I'm copying have rngRegion2 defined on different sheets. I'd like to try and avoid this problem all together by not copying named ranges if possible.

If thats not a viable option, is there code that I can use to tell it to automatically select "Yes - To use the name as defined in the destination sheet" as opposed to prompting the user to select yes/no?

View 2 Replies View Related

Workbook With A Globally Defined Named Range

Feb 19, 2010

I have a workbook with a globally defined named range "MyArray" which refers to a constant array = {"Item1","Item2","Item3"}. My general module contains the following

View 4 Replies View Related

Named Range: Create Copy From Another Workbook

May 28, 2008

I have a named range within a sheet. It was pulled across when i performed a move/copy - create copy from another workbook. The name contains characters that cannot be displayed or recognised and so they are displayed as square
symbols. This causes me an issue as i cannot delete the name. Even if i paste the list names, i cannot copy/paste the name as the characters are not recognised. I also tried using a macro to delete all names, which did delete all names, with the exception of this one.
The VB code used was :

Sub Del_Names()

Dim myname As Name

For Each myname In ActiveWorkbook.Names

myname.Delete

Next myname

End Sub

View 9 Replies View Related

Access/Reference Named Range In Another Workbook

Oct 5, 2006

I have two workbooks wkA and wkB. I have a named range in wkB called BName.. can someone tell me whether it is possible to set a range variable (say, raA) from wkA to this named range in wkB. I have tried something to the effect of set raA = wkB.range("BName") but this doesn't work.. I've also tried set raA = [wkB.name].range("BName") to no avail. I'm wondering whether named ranges can actually be read from other workbooks.

View 4 Replies View Related

Save Workbook Named As A Number With Leading Zeros?

Sep 15, 2014

I have been using a piece of code to save a workbook and name it as the value in a cell, for a long time the value in the cell has been alphanumeric and all has worked well. I now need to save the workbook as a 6 digit number and it has to include the leading zeros.

VB:
Sub Name ()
Dim stBatch1 As String
Range("Batch").NumberFormat = "000000" [code]....

With 000001 in the cell called Batch all that gets returned is 1, I have tried changing stBatch1 from String to Integer and that returns -1, I have also moved the NumberFormat around to various places in the code and mostly it just returns True.

View 2 Replies View Related

INDIRECT And Named Ranges Referencing Closed Workbook

Oct 4, 2005

I have tried using PULL from Harlan Grove's posts to workaround this but am coming up with #VALUE errors.

Here's what I have:

Column B contains the acct # being referenced e.g. 5230
Column E="_"&Br where r is the row #
Column F=MATCH($B$3,INDIRECT(Er&"Rows")) where _acct#Rows is a named
range referring to an external workbook e.g. _5230Rows
Columns G-R=INDEX(INDIRECT($Er),$Fr,COLUMN(G$6)) where_acct# is a named
range referencing an external workbook e.g. _5230

I thought that INDEX($Er, $Fr, COLUMN(G$6)) should work in Columns G-R however it returns #REF!

I need a solution to replace INDIRECT so I do not have to have both workbooks open together. The named ranges are static, but reference external workbooks.

View 13 Replies View Related

Macro To Find Named Worksheets In Workbook And Delete?

Nov 27, 2012

I need macro to find worksheets (tabs) starting with word 'sample' in name and delete all instances of worksheets starting with that word.

View 1 Replies View Related

Add Worksheet To Workbook Automatically Named As Cell Heading

Sep 7, 2006

i have fixed headings in row 1. these could use up to 20 columns

in row 3 i could put data under any of the column heading

if i put data in any of the columns i would like a new worksheet created. the name of that worksheet to be the column heading not the data i have just entered. if no data is entered then no worksheet is created

View 6 Replies View Related

Save Monthly Data To New Workbook Named As Month

Apr 13, 2008

I have a spreadsheet that has 3 columns, date, id and amount for the whole year.

what I need to do is have a macro on another sheet or workbook that has an entry for month. when i enter the month, i need to get all the data for that particular month and then save it with the month name. i am not very sure how i can do this. pivot table does not work as i need to save a file each month.

View 9 Replies View Related

Move Differently Named Sheets In Workbook - Some Missing Due To No Info

Apr 18, 2013

I am trying to use a macro to move a range of excel tabs to the front of the workbook however some of the tabs could be missing due to no information.

If I simply record the macro by moving them manually if the procedure arrives at one that is missing it would report an error.

So in essence I need it to look for the tab and if its there move and if its not move onto the next until it arrives at the last one.

View 9 Replies View Related

Using Named Range On Different Sheet?

Nov 17, 2013

I am trying to use a named range on a different sheet in the same workbook to which the named range is on.

I have a named range on sheet2 called "Letters" and comprises of cells D20-D25 .

I am trying to call this range on Sheet1 at A1-A6 , so in A1 to A6 I simply have "=Letters" (No quote marks) , but I simply get "#VALUE!" (No Quote Marks), If I then extend the selected cell down to A25 the "Letters" will appear in A20-A25
whereas if I put the same "=Letters" in Sheet1 cell A20-A25 I will get the correct named range.

How can I get the range to show in Sheet 1 Cell A1-A6.

I want to reproduce a named range at a different location on a different sheet in the same workbook.

View 2 Replies View Related







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