Enable Different Macros Based On Combo Box Selection

Mar 10, 2009

I have a spreadsheet with 2 combo boxes - Combobox 1 enables a user to specify if they want to look at the data on the sheet by week or month - it has just 2 options - "select by week" or "select by month"

The list in combobox 2 changes based on the selection in combobox1 - so if you select "select by week" , a date list by week shows up.

Combobox 2 is supposed to run a macro which updates some backend pivot tables. there are 2 types of backend pivottable - weekly tables and monthly tables.

What i am not sure about is how to get the selections in combobox 2 to run either the weekly macro or the monthly macro based on if combobox1 is set to week or month ...?

View 9 Replies


ADVERTISEMENT

Copy & Paste Selection Based On Combo Box Selection

Jan 30, 2007

I have attached a portion of an excel file I am using at the moment. What I require is a piece of VBA code which will allow me to copy selected data based on a combo box selection. What needs to happen is this :-

If the selection in the "Index" worksheet combo box related to "Month" in cell G19 is for instance "December", I would like the macro to compare this cell value to the cell values in cells C96, C124, C152, C180, C209, C236, C263 and C290 in the "Tech Services" worksheet and where the values match.......copy the commentary (Range C126:Z147 in December's case) to the range C34:Z55.

View 9 Replies View Related

VBA To Display Scenarios Based On Combo Box Selection

Feb 24, 2009

I just want to create a combo box that will allow my manager --- not so good at using menu commands or the scenario manager --- to choose one of five different budget scenarios. I can't seem to get the actual scenarios to change when the selection is made from the combo-box.

This is the

View 4 Replies View Related

Populate Two Text Boxes Based On A Combo Box Selection

Dec 31, 2009

I want to populate the values of two textboxes that we will call TextBox5 and TextBox6 from columns W and X of a spreadsheet called "PowerAnalysis" when a selection is made form ComboBox5.

The ComboBox5 works perfectly now. I just need it to populate the other two text boxes.

All the data resides in the same row on the same sheet of PowerAnalysis when the selection is made in ComboBox5.

I hope I have been able to give a clear picture of what I am wanting to do.

View 9 Replies View Related

Change Shape Color Based On Combo Box Selection

Aug 7, 2007

I am trying to use a userform ( Combo Box) to update my named cell "Aircraft1" then based on the value selected change the color of an object.

The code works great if I manually enter the value in the cell "Aircraft1", however if the dropdown list selects the value the object does not update its color.

Is there a way to update the cell via a combo box, and then have the VB code change the color of the object?

This is my

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("Aircraft1")) Is Nothing Then Exit Sub
ActiveSheet.Shapes("Arrow1").Select

With Range("Aircraft1")

If .Value = 1 Then
ActiveSheet.Shapes("Arrow1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 17

View 5 Replies View Related

Enable/Disable Macros When No Macros Are Present

Jul 28, 2008

I have a user that keeps a maintenance log in an Excel worksheet and sends an updated copy once a week to a board member. Two weeks ago, the board member started complaining that he was prompted to enable/disable macros on opening and became worried when my user stated that no macros were used in the book. He is now concerned that we have sent him a virus.

I know the file is clean because I've scanned it, and when I look at the file in VB, there are no modules or classes present just the Sheets 1-3 and the ThisWorkbook file. None of these objects have any code in them. My user does have some macros in PERSONAL.XLS but they are not used in the workbook in question.

No one else gets the prompt for enabling/disabling macros. Even if I set my security to prompt for any macros, I get no message. I'm convinced that there must be some setting in his Excel that is causing this individual to get this message. Is there anything else other than a macro that would cause this?

View 9 Replies View Related

Values Of Combo Box Dependent On Selection In Another Combo Box

Oct 9, 2008

The first combo box is on a userform so that a subject can be selected

View 3 Replies View Related

Run Individual Macros Based On Validation List Selection

May 7, 2008

I have been searching through the site trying to find a solution to my issue, but I just can't seen to fixt it. Here is the scenario. I am working on a spreadsheet that will read some data, use that data to update the main chart and fill in the information in a table next to that chart. I recoreded 22 macros, total. Each macro corresponds to the especific type of chart that I need/want.

I want to be able to click on a drop down menu above the chart which will have each of the 22 options. Once the user clicks on the desired option, the specific macro will run and do that it should do. When I run the individual macro (without the VB that I wrote and will mention below), the system does what it should do. Everything looks dandy. But then I added this VB code to the sheet where the chart is:

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Range("A12").Value
Case "1"
Call a
Case "2"
Call b
Case "3"
Call cc
Case "4"
Call d
Case "5"
Call e................

View 2 Replies View Related

Enable Macros On Open

Feb 12, 2010

Is there any code that will automatically enable macros on Auto_Open?

View 6 Replies View Related

Enable/Disable Macros- None There

Apr 24, 2009

On several of my worksheets, I'm asked if I want to disable/enable the macros but there are none associated with that particular worksheet- matter of fact, none of my worksheets have macros unless pivot tables count, so why am I being prompted in that way?

View 9 Replies View Related

Macro To Enable Macros

Oct 23, 2006

I am trying to use the EnableMacros. zip script located here {url} But I am having a hard time making it work!

1. I have copied the module in EnableMacros.zip and imported it into my workbook.
2. I have placed identical code in my workbook's ThisWorkbook as is in the EnableMacros.zip's ThisWorkbook.
3. I have copied Sheet1 from EnableMacros.zip titled "Info Sheet". In MY workbook it is sheet7, but it is titled the "Info Sheet" in the EnableMacros.zip.
4. I have also copied sheet6 from EnableMacros.zip into my workbook and titled it "LoadScreen". In EnableMacros.zip the sheet is titled "Sheet1"
...

View 4 Replies View Related

End User See The Warning Enable Macros

Sep 10, 2009

I have a couple spreadsheet Excel 2003 that I have to Email, I use a few macros with these spreadsheets. The Macros are kept in my personal workbook. When I Email these sheets does the end user see the warning enable macros or do they just see the sheet as is. I am mailing the whole workbook but macros are in my personal workbook. If they see the warning is it possible for me to Email so they will not have to contend with that?

View 3 Replies View Related

Pop Up Message To Enable Or Disable The Macros

Apr 17, 2008

Whenever I open an Excel file that has macros in it, a message always pop up and ask if I want to enable or disable the macros.

Is there a way to get rid of the message?

View 9 Replies View Related

Vba To Enable Macros And Hide Certain Sheets

Jan 16, 2010

1) Force user to enable macros.
2) keep three worksheets very hidden all the time.
3) passwrd protect vba

I have been using this code to force user to enable macros but this unhides all sheets other than "macros not enabled" sheet. I need three worksheets to remain very hidden all the time. How do I do this.

Option Explicit
Dim ws As Worksheet
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("Macros Not Enabled").Visible = True
For Each ws In Worksheets
If ws.Name "Macros Not Enabled" Then ws.Visible = xlVeryHidden
Next
End Sub
Private Sub Workbook_Open()
For Each ws In Worksheets
If ws.Name "Macros Not Enabled" Then ws.Visible = True
Next
Worksheets("Macros Not Enabled").Visible = xlVeryHidden
End Sub

View 9 Replies View Related

Encourage Users To Enable Macros

Jun 14, 2008

I have been looking at Dave's Script found in this post Determining if macros are enabled It works just like i want it too. But when I try and use it in my workbook with differnt sheet names it doesnt work. I have even tryed to rename the sheets in the example file and it stops working. My sheets are as follows:

Sheet1 (JI)
Sheet2 (GC)
Sheet3 (ET)
Sheet4 (SV)
Sheet5 (JB)
Sheet6 (P)
Sheet8 (Info Sheet) <----This is where the Notice to turn on Marcos is
Sheet9 (D)

I have the following code in Module2

Public bIsClosing As Boolean
Dim wsSheet As Worksheet
Sub HideAll()
Application. ScreenUpdating = False
For Each wsSheet In ThisWorkbook.Worksheets
If wsSheet.CodeName = "Sheet8" Then
wsSheet.Visible = xlSheetVisible
Else
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
Application.ScreenUpdating = True...................

View 2 Replies View Related

Enable Macros Automatically/force On The Startup - :D

Feb 9, 2007

the system i'm creating involves many user ... some may know how to decode the system esp. on the startup ... if they click disable macro they can view, edit and delete important data in the system ... can somebody guide me on how to automatically enables macro on excel file on startup???

I've tried:
- setting security to low - but got auto reset by administrator.

View 2 Replies View Related

Prevent Editing After Date And Force Enable Macros

Apr 7, 2014

So I have a Workbook that I want to make read-only/protect after a certain date. I also want to force the user to have macros enabled. So far I have the following script, but despite changing it to read-only it doesn't seem to do anything. I have also tried to enable protection on the sheets after that date, but am getting errors.

View 2 Replies View Related

Enable Macros Upon Opening A Workbook And Avoid Receiving The Message

Jul 14, 2009

What is the code to enable macros upon opening a workbook and avoid receiving the message "Security Warning-Macros have been disabled" in Excel 2007?

View 3 Replies View Related

Excel 2003 :: Force Enable Macros - Crash / Need Toclose

Mar 13, 2012

I have been using Erik's fantastic "Force Enable Macros" code (exactly as it appears)...

force enable macros & ASK to save changes (SOLUTION)

...with the desired results (and comfort) under Excel 2003.

The code works under Excel 2007. However, if there is another workbook open at the sametime (regardless of whether Workbook two has macros or not), I get an Excel "crash";

Code:
Microsoft Office Excel has encountered a problem and needs to close.

[ ] Recover my work and restart Microsoft Excel There is also a Event ID 7001 in the Event Viewer. I have run Excel diagnostics and there are no issues.

View 8 Replies View Related

Putting Enable Macros Button Into Userform Type Display

May 12, 2013

In reference to my other topci here: Userform Error

In this workbook I have successfully made it act like a userform calculator, the user does not ever see the actual sheets in the workbook, their only interface is the Userform calculator I created.

This is exactly how I want it, they do not need to see the sheets, nor do I want them to.

This leads me only to my next problem... Some of the users obviously wont have Macros automatically enabled, what I am wondering is, is there a way to put the normal "Enable Macros" button which appears along the top of a macro containing workbook when opened, I want to put this button into a userform like display without showing the workbook at all.

So here the process I envision:

1. User double clicks the file
2. It opens and automatically goes invisable (like it does already)
3. If the user does not have macro enabled, a userform like box appears and says "Please enable Marcros to user" with a button below for "Enable" and "Exit"
4. If exit is pressed excel closes
5. If enabled is pressed Macros are enabled and then they will automatically see my calculator userform like normal.

As you see, at no point do I want them to see excel or a workbook, just userforms so its not like they are using excel at all.

I have searched around the net and found a few ideas to tackle this, mainly one that has a "Prompt" workbook that shows when macros are disabled, but that is not ideal for me. However perhaps I could just edit this "prompt" code thing for my situation?

Here is the prompt sheet code I talked about:

Code:
Option Explicit
Private Sub Workbook_Open()
With Application

[Code]....

How to use:

Open an Excel workbook Select Tools/Macro/Visual Basic Editor in the VBE window, select View/Project ExplorerSelect the This Workbook module Copy and paste the code above into this ModuleNow select File/Close and Return To Microsoft Excel Don't forget to save your changes...

8. Name one of your sheets "Prompt"

View 2 Replies View Related

Enable Command Button If ANY Of 4 Listboxes Have Selection Made

Feb 12, 2014

I have a fairly straightforward UserForm with 4 listboxes and 4 option textboxes (the textboxes do not need to be a part of the validation I'm needing). I then have a command button that I want to be enabled ONLY if ANY of the 4 Listboxes have a selection. I've tried the "Change" event code below and it works upon the first selection of any listbox item.

However, if the user de-selects all selections in the listboxes (i.e. they are all unchecked), the command button remains enabled. I need the validation logic to enable/disable the button to persist as long as the user has the form open and if there is not a selection in ANY of the listboxes. The reason being is that if they click the command button it will update the cells in the worksheet, which if empty may overwrite previous work completed with blank cells.

View 3 Replies View Related

ActiveX Listbox - Enable Scrollbar / Disable Selection

Jun 20, 2014

Is it possible to disable and ActiveX listbox, but allow the scrollbar to work?

Or, prevent selections without changing the enabled property?

I'd like to populate my list with items that are for information purposes only.

View 8 Replies View Related

Force User To Enable Macros - Issue With Activating Specific Sheet Afterwards...

Aug 4, 2009

I am utilizing the following code to force the user of my database to enable macros. This is the

View 4 Replies View Related

Sub To Be Run ONLY When A User Changes A Selection In The Combo Box

May 16, 2009

I want is to happen is that depending on which option a user selects from the drop down box (a total of 10 options), a select number of rows and columns should be hidden/visible (as you'll see from the below code..)

The other issue I'm having is that with the below code, the workbook seems to be very "busy" constantly calculating something or the other. I need the Sub to be run ONLY when a user changes a selection in the combo box, but it appears that every few seconds the workbook will be calculating something.

Finally, I introduced the GoTo Endo line after every option (1 to 10) to try and speed up the Sub when a user makes a selection, but this appears to make no differnce - it still takes forever to run the Sub.

View 2 Replies View Related

Combo Box Selection Will Not Calculate

Jun 15, 2009

I am using 3 combo boxes to select the year, month and day for a scheduling worksheet. Each combo box is linked to a cell which is 'named' accordingly.

When I select the year and day, the calculations in the worksheet work. But when I select the month, the calculations will not work.

If I enter the month number into the linked cell using the keyboard and
press 'enter', the worksheet calculates perfectly. Only when the month
number is entered into the linked cell by selecting in with the combo box, it does not work.

BTW: I am intentionally trying to avoid using macros for 'security' reasons.

View 9 Replies View Related

Vba-populate Listbox After Selection From Combo

May 16, 2009

In my workbook i have worksheets that are named 01-Jan-2008,15-jan-2008,30-jan-2008...and i have almost 50 for each year.from 2007 to 2009. I have created a userform where i have a Year combobox with values 2007,2008,2009 and an ok button
then in the same form, i have a listbox and an Ok button and a back button.

i want the user to be able to pick the Year from the combobox. once he specifies the year, the worksheets corresponding to that year should appear in the listbox...instead of populating it with all the 100+ wksheets i want the search narrowed down.

View 2 Replies View Related

Displaying Input Box Based On User Selection Of Dropdown Selection?

Jun 3, 2013

If a user selects certain options from a drop down list created by cell verification (from list), is it possible to display an input box and have the resulting input populate on another worksheet in the workbook? I have an attendance template I'm working with and if a user selects OT (Over Time) then a input box is displayed prompting for how many hours. The overtime is then tracked on another worksheet.

View 1 Replies View Related

Enable / Unenable Based On Cell Value

May 27, 2009

I have the following script in a command button. the command button is for the month of january. I would like to enable the button based on if a cell value is January, or unenable it based on the cell value being any month after January....

View 7 Replies View Related

Restrict Drop-Down Selection Based On Selection From Another

Jul 20, 2007

I want to have a drop down list in a cell so that the value in the cell can be only selected from two columns of data. Additionally once the data from the first column has been selected I want to be able to limit the inputs the user can select from in the second column.

e.g. In cell C115 I want to have the value BDS05.

I want to be able to select the value BDS from a drop down list of values and once that value has been selected I want to be able select 05 from a list of values from 01 to 14
If I select BCS as the first value then I want the second set of values to be limited to 01 to 02 etc.

I have read about combo boxes and list boxes and I'm a bit confused about the best way to achieve this (or even if I can).

View 6 Replies View Related

Enable/Disable A Range Based Upon A CheckBox

Oct 23, 2008

I am attempting to modify a spreadsheet so that it will enable a range on Sheet3 (I9:K42) if a check box is checked on Sheet2. If it is not checked, it will lock that range on Sheet 3 and grey (or gray, if you prefer) out that range.

View 9 Replies View Related







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