Macro To Go To Specific Sheet Upon Choosing Option

Oct 16, 2007

Im looking to create a macro that goes to a specific sheet on my workbook upon selecting an option. Example being I open the spreadsheet and a list of options come up such as:

BRIAN
JOHN
JAMES
PAUL
STEVEN

Upon selecting one of those names you are transferred to the sheet named "BRIAN", "JOHN", "JAMES" etc etc etc

View 4 Replies


ADVERTISEMENT

Macro Print Invoice After Choosing Sheet From Dropdown List

May 1, 2014

with the following....In the first sheet of attached file I keep data regarding all invoice sheets next to the data sheet (not visible in this example). I like to print an invoice in all sheets (area H3-AI43) from a selected invoice sheet out of a drop-downlist in the "data"sheet. After printing the actual printdate must be placed in column F of the "data" sheet next to the sheet number. Would be great if this is possible! Maybe I'm not clear enough. The purpose is to print only 1 invoice from a selected sheet out of the drop-down list.....and not all invoices from all sheets!

View 4 Replies View Related

Choosing Specific Printer In Vba

Jun 16, 2007

In my program I want some labels to be printed on printer P661 (black/white) and other labels on printer P656 (color).

Q: is it possible to do this in vba for my code?

The labels are made in Word and printed from within Excel.


Sub PrintNACL_LABEL()
Dim oWord As Object
Dim sPath As String
Dim iCnt As Integer

sPath = ThisWorkbook.Path & Application.PathSeparator & "NACL_LABEL.doc"

iCnt = Val(InputBox("Hoeveel exemplaren?", "NACL_LABEL", 1))

If iCnt >= 1 Then

Set oWord = CreateObject(Class:="Word.Application")

With oWord.Documents.Open(sPath)
.PrintOut Background:=False, Copies:=iCnt
.Close False
End With

oWord.Quit False
End If

Set oWord = Nothing
End Sub

The specific printers in the network are:

Color ---> "\PlantijnP656 op Ne00:"
Black/white ---> "\plantijn2000oldP661 op Ne02:"

View 9 Replies View Related

Choosing Values From One Sheet

Oct 18, 2006

I have attached a sample of what I am trying to do. What I want to do is to be able to go through each day sheet and choose the name and times from the list box's I've created and have it show up on the summary page to match. So if I'm scheduled to work on Wednesday at 9am... I want it to show up on the summary page under Wednesday at 9am that I am working, but If I am not working I want it to be just an X to show up.

View 5 Replies View Related

Macros Not Visible: End User To Be Able To Run The Report Multiple Times By Choosing The Name Of The Macro From The Macro Menu

Jul 16, 2007

I have written two VBA programs around the same time. Both run on open and pull external data and create graphs. My problem is that I want the end user to be able to run the report multiple times by choosing the name of the macro from the Excel macro menu (i.e. Tools>Macro>Macros) but only one of the workbook macros shows up on the menu. why the other macro is not visible on this menu???

View 2 Replies View Related

Have Macro Point To Current Sheet Instead Of A Specific Sheet Name

Apr 2, 2009

How do I change this macro to refer to the current sheet name instead of "FullScreen (2)"?

View 4 Replies View Related

Bind Specific Userform Per Option Button?

Apr 2, 2014

I am working on a file composed of 3 userforms.

Userform1 = Made of 2 Option buttons namely Data 2 and Data 3 and the usual command buttons.

Userform2 = I would like this to be the one that appears if I choose Data 2 and click Ok.

Userform3 = I would like this to be the one that appears if I choose Data 3 and click Ok.

View 4 Replies View Related

Run Worksheet Specific Macro Only On One Sheet?

Apr 15, 2014

I'm trying to add some code so that it only runs on the specific sheet or a range of specific sheets - but this list might change in the future) as a worksheet event... When I have been doing this in the past, I have been copying the code to each of the individual sheets but this now seems to be incorrect.

This time, though, I have created the code on one sheet (with a Private Sub Worksheet_Calculate() event) which launches a macro in a separate module - my logic being to have as little code as possible in each of the sheets for copying, pasting, editing purposes, and centralise the main code in the module. However, I've noticed that this code is actually being run on all the sheets - even those I do not want it to run on. I thought, while developing this code, that it would only run on the one sheet it had been added to (e.g. right click the worksheet name, view code).

View 7 Replies View Related

Run Macro In Specific Sheet Range?

Jun 16, 2014

I have my template workbook with sheet tab as following:

Summary/Report/Contact 1/Contact 2/Contact 3/Contact 4/Contact 5/Note/

And I have one macro to run and only want to run in the specific sheet as below:

Summary/Report/Contact 1/Contact 2/Contact 3/Contact 4/Contact 5/Note/

The sheet name for contact 1 to 5 is varies means it can be change to any name based on different job. How should I write my macro in order to do that with one macro?

View 5 Replies View Related

Macro Showing Only A Specific Sheet

Sep 7, 2009

Writing a macro that when runned will show only two specific sheets in a work book. If i run macro 1 the sheet "xxx" and "start" should be the only visible sheets in the work book. If i run macro 2 after having runned macro 1 sheet "yyy" and "start" should be the only sheets appearing.

View 9 Replies View Related

Option Button On Sheet 1 To Change Image On Sheet 2

Jan 15, 2007

Sub OptionButton222_Click()
With Worksheets("Beam Input")
.Shapes("Notch 1").Visible = False
.Shapes("Notch 2").Visible = False
End With
End Sub
Sub OptionButton223_Click()
With Worksheets("Beam Input")
.Shapes("Notch 1").Visible = False
.Shapes("Notch 2").Visible = True
End With
End Sub
Sub OptionButton224_Click()
With Worksheets("Beam Input")
.Shapes("Notch 1").Visible = True
.Shapes("Notch 2").Visible = False
End With
End Sub

i need to modify it so that a selection on the beam input page causes the images to change on the beam output page. Currently this code is in the module section of VBA.

View 2 Replies View Related

Assigning Macro/Module To Specific Sheet

May 27, 2009

I have a workbook that has 2 similar worksheets. One called "Wood Shafts" and the other called "Iron Shafts" I have the macros worked out for the sheet called "Wood Shafts" and I just realised I need to apply similar Macros to the sheet called "Iron Shafts" (same functions but different values from different columns). Some how I need the code to be able to tell the difference between the two sheets. I am at a loss.

View 4 Replies View Related

Disallow Specific Format Of Sheet Name From Macro

Jun 30, 2007

The below piece of code is from a macro that creates a summary sheet based upon the name of the worksheet. My problem is as follows: I have another macro which copies the summary sheet and renames it in the format dd-mm-yy and I want to exclude this from the macro that constructs the summary sheet. How do I modify line 4 to capture the exclusion of all sheets with format ##-##-##? Note: The current line is my poor attempt at doing it.

If (A$ = "Template") Then Goto 10
If (A$ = "Create New Sheet") Then Goto 10
If (A$ = "Summary") Then Goto 10
If (A$ = Like "00-00-00") Then Goto 10

' Process the current sheet
Range("A" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C15"
Range("B" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C16"
Range("C" + Format(j)).FormulaR1C1 = ""
Range("D" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C18"
Range("E" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C19"
Range("F" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C20"
Range("G" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C21"
Range("H" + Format(j)).FormulaR1C1 = "='" + A$ + "'!R4C22"
j = j + 1
10 Next i

View 10 Replies View Related

MACRO To Get Sum Of Specific Column From Various Worksheets And Appending Sheet Name

May 6, 2014

I have a workbook named as "DCR_Summary". In the sheet "FX", I want to get the sum of a specific column from two different workbooks named as "WNCR REPORT" and "DCCR-REPORT". The name of the column is "FXCOLL". The summation should start in row 7 all the way down where data is available. The good thing is that, my sum range will always starts at row 7 in both files but the bad thing is that the position of column "FXCOLL" is changing every day. The expected result is shown in the attached "DCR_Summary". It should pick at the same time the Sheet names where the summation came from. Sheet names is also changing and sometimes the FXCOLL is nil, hence, 0 value can be returned.

View 5 Replies View Related

Macro To Copy Data From One Workbook To Another On Specific Sheet?

Aug 28, 2009

I have two workbook having 8 worksheet each. Every day I need to copy data from previous day worksheet and paste it on new workbook with same sheet name.

For example :-
Workbook1 is having sheet named aa, gg, tk .....
Workbook2 is having sheet named as same as Workbook 1

Now, I want macro to copy data from Workbook1, sheetname 'aa' and paste the same in workbook2 in sheet name 'aa' and likewise

View 6 Replies View Related

Macro To Print Specific Sheet If Name Appears In Cell

Nov 13, 2013

I am trying to print one of the Sheets in my Workbook by looking at a specific cell that can have one of the sheet names.

View 7 Replies View Related

Save Excel Sheet To A Specific Location Through Macro

Nov 19, 2009

I have a excel sheet which is completely formula driven and no macros in that.

I want to macro which can save that excel sheet to a specific location.

View 9 Replies View Related

Macro To Copy To Specific Sheet Depending On Cell Value

Jul 28, 2006

This is the code I have:

Sub Auto_Open()
Sheets("Data").Select
Range("A2:E32").Select
Selection.Copy
Sheets("May").Select
ActiveWindow.SmallScroll Down:=-9
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Sheets("Data").Select
Range("A1").Select
ActiveSheet.Paste
Range("A1").Select
Sheets("Sheet1").Select
Range("A2:E32").Select
Selection.ClearContents
Range("A1").Select
End Sub

1) How do I set this up so that if the cell Z1 reads 1, it will paste the data to the "January" Sheet, if Z1 reads 2, it will paste to "February" Sheet, if Z1 is 3 it will paste to "March"......

View 9 Replies View Related

Macro To Copy Specific Data From One Sheet And Paste Into Two Sheets

Mar 24, 2009

There's one sheet that has a list of customers (this is updated very frequently). These customers are either ‘New’ or ‘Existing (as listed in a corresponding column) - would it be possible to have a macro that, when run, will place a copy of existing customers into a second worksheet (“view list – new”), and a copy of new customers into a third worksheet (“view list – existing”), with the main worksheet still listing both existing and new customers.

As the main sheet that lists all customers is updated very frequently (with customers being added and removed throughout the day), would it be possible to clear all contents of the other two sheets that each list of 'existing' and 'new' customers will be copied into, before the two lists are copied into each of the two sheets (just to ensure there isn’t any data in there from the previous time each list was copied in).

I’ve given this a go via the ‘record macro’ function - some users of this WB use excel 2000, and others use excel 2007, but it only seems to work on excel 2007 (which is what it was recorded on)…

View 3 Replies View Related

Macro For Filtering Spread Sheet By Date And Specific Person

Dec 15, 2006

I am fairly new to macros and I am currently working on a project where I would like to create a 2 buttons which will filter by date and by owner. The spread sheet I have is fairly large and is added to weekly.

I have two objectives that I am trying to reach:

First I need to filter for all past due task items from the Thursday of the week I am working in back and for a specific person (owner) by the finish date

Second I need to filter for upcoming tasks one week out for a specific person (owner). The objective of this is so that on any given day a user can find any upcoming tasks that are due one week out.

If this is not an option. My thought was to create an input box where the user can input the date and the information on the spread sheet will pull all past due items or upcoming tasks. These two items need to pull seperatly not together.

I know I can create a macro by autofiltering by columns however I am trying to avoid having to go in and change the date each week.

Start date is column E
Finish date is column F
Owner is column L

View 10 Replies View Related

Macro To Find Replace Specific Text In Multiple Sheet Names

Sep 13, 2010

I need a macro that will look for a specific text string in the tab names of the workbook and replace it with a new specified text string (leaving the rest of the existing tab names). In other words, a simple find/replace but applied to all tab names in the workbook rather than cells. Ideally, I'd like it to pop up something and ask for the text to find and the text to replace it with, so I don't have to edit the macro itself each time I want to use it, but editing the macro each time is fine. Either way will be wonderful.

View 9 Replies View Related

Macro To Find Specific Text In Column And Copy Certain Cells In Same Row To Different Sheet

Dec 30, 2011

how to work macros or VBA

I have a workbook with multiple sheets named by month and year that I use to keep track of loans I work with at a bank. In these sheets I have info such as:

Column B = due date
Column D = loan# A
Column E = loan# B
Column F = status
Column H = followup needed
(Columns A,C, and G aren't important for the current need)

What I am trying to do is create a main sheet (TRACKER) that all I will have to do is press a macro button and it will pull info for each loan that is in a pending status.

I need a macro that will search column F (Status) on all sheets and find each instance of "Pending" and once that is done, copy rows B,D,E, and H in each "Pending" instance and copy them to their designated area on my TRACKER sheet. After that is done I need it to continue to the next "pending" instance and do the same on the next available line on my TRACKER sheet.

The overall goal would be that everyday I can press the macro and it will repopulate the sheet with the current pending items (as each day I will change pending status' to complete and no longer need to track it the next day).

I already have the tracker sheet set up and ready to go with the spaces as follows:
Column G&H = Merged cells where due date will need to go
Column I&J = Merged cells where loan# A will need to go
Column K&L = Merged cells where loan# B will need to go
Column M thru S = Merged cells where followup needed will need to go

View 9 Replies View Related

Dropdown Option For Summary Sheet

Jul 22, 2014

I will have a summary tab and then a number of tabs with various options in detail

What I would like to do is some way of adding the options on the summary tab - some sort of drop down I guess

Is this possible without lots of programming etc...

View 4 Replies View Related

Control Option Buttons On One Sheet?

May 20, 2014

I have a spread sheet and I want to have multiple option buttons on it. but for separate things

e.g. I need roughly 50 option buttons. however. I want about 25 groups of them.

so I want 2 buttons next to a cell where user can select one. then I want 2 more on cells below where user selects one for a different question

but at the moment, every single option box copies every other box when I changed the format control cell reference. even though I haven't copied and pasted them!

View 9 Replies View Related

Add An Option To Print All Except Hidden Sheet

Dec 21, 2006

I have been using this to print multiple sheets. The only problem is if you want all sheets in the workbook you have to check every one. How would I add an option to 'print all'? But I still wouldn't want to print the hidden sheets.

Option Explicit

Sub SelectSheets()
Dim i As Integer
Dim TopPos As Integer
Dim SheetCount As Integer
Dim PrintDlg As DialogSheet
Dim CurrentSheet As Worksheet
Dim cb As CheckBox
Application.ScreenUpdating = False

' Check for protected workbook
If ActiveWorkbook.ProtectStructure Then
MsgBox "Workbook is protected.", vbCritical
Exit Sub
End If...............

View 9 Replies View Related

How To Hide (View Code) Option For A Sheet

Nov 22, 2012

I have a login page for my spreadsheet however a user can simply view the code to get the login username and password.

View 2 Replies View Related

Disable Copy / Paste Option For Particular Sheet?

Dec 8, 2013

I have workbook having 3 sheets out of them 1 sheet name "report". I want vba to disable copy /past option to sheet Report only with msg " copy not allowed" if key clt+c or copy option selected

View 1 Replies View Related

How To Remove Delete Option When Right Click On Sheet Tab

Jun 21, 2014

When right clicking on the sheet tab, I need to know if it is possible to remove the "Delete" from being an option. My workbook is structured to where if a single sheet is deleted, it screws up all my formulas. I tried to just password protect the workbook, but doing that removes the "Rename" function, which I still need.

View 9 Replies View Related

Excel 2013 :: CF With 2 Option Buttons / Multiple Option Groups?

Sep 6, 2013

I have several option groups (Y & N in each) linked to cells to display TRUE / FALSE depending on which option is selected in each group. I have another cell which I want to apply conditional formatting to if EITHER Y or N is selected in all groups. At present I use COUNTIF to check for FALSE=0 in the linked cells which works if all the answers are Y. How do I apply CF if there is a mixture of Y & N (TRUE / FALSE) in all groups (I'm not sure if I've explained that well or not).

Excel 2013

View 1 Replies View Related

Option To Hide The Sheet When Disable Macros Is Clicked

Apr 29, 2009

Is there any option to deactivate the "Disable macros"

Or

When i open the userform it asks for enable and diable macros. If i click "Disable macros" then the users can manipulate the data inside the excel sheet. i need to avoid this problem.

So, is there any option that if i do "Disable macro" then the corresponding sheet for the which the Userform is linked should not be visible or hidden.

View 9 Replies View Related







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