Running Macros And Activex Controls

Jun 10, 2009

Here is a sample of code I am having problems with:

Sub CheckBox1_Click()
Range("Make") = Range("Make1").Value
Range("Model") = Range("Model1").Value
Application.Run ("EnterPrice")
Aplication.Run ("Unit Selection")
CheckBox1.Value = True
End Sub

I am having problems with the named ranges "Make" and "Model" which are on another sheet and with runninh the "EnterPrice" and "Unit Selection" Macros which are in Module1, I get the error message "Method 'Range' of object '_Worksheet' class failed"

View 9 Replies


ADVERTISEMENT

VBA Commands For ActiveX Controls

Jul 24, 2009

I have made an Excel sheet that uses ActiveX controls (Option Box and Check Box). I have included a couple of screen caps at the bottom of this post to better explain the layout. Here are the specifics:

There is one Option Box Group labeled "InputOptionGroup" with choices labeled: "FirstOption", "SecondOption", "RefundOption" and "NoneOption".

Adjacent to the Option Box is a series of Check Boxes that correspond to the choice made in the Option Box with the exception of "NoneOption". The Check Boxes are labeled "FirstCheck", "SecondCheck" and "RefundCheck". Each Check Box object belongs to the group labeled "OutputCheckGroup".

I do know that the value of the Option Box choices and Check Boxes can be either True or False depending on if it has been chosen or marked, but I do not know how to incorporate these values into the action script. With that being said, here's what I'm trying to accomplish:

...when "FirstOption" is chosen, clear values of all Check Boxes and place a check mark in "FirstCheck".
...when "SecondOption" is chosen, clear values of all Check Boxes and place a check mark in "SecondCheck".
...when "RefundOption" is chosen, clear values of all Check Boxes and place a check mark in "RefundCheck".
...when "NoneOption" is chosen, clear values of all Check Boxes (no furthur action).

Also, there are a couple more requests:Is there a way to lock the Check Boxes from user input? I want the Check Box values to be altered only by the choice in the Option Box.
Take the "GPIN" field, the one on the right is locked from user input. This particular cell references user input from the "GPIN" field on the left. Is there a way to return a blank value when the input field is blank insted of returning a "0"? If you notice, all fields on the right reference blank values as "0".
In the left "Amount" field, I need to display a "$" followed by the value in the input "Amount" field

View 9 Replies View Related

Deleting VBA Modules And ActiveX Controls

Sep 5, 2008

When I try to open a worksheet that has any sort of macros I get the "error opening file" popup with the request to send the error to Microsoft.

When I check the box to "recover and save file" and proceed I am told that repairs were necessary to save the file

The repairs stated are " LOST VBA MODULES" and "LOST ACTIVEX CONTROLS"

I have not changed anything to my knowledge.

Changine the macro security settings to low has no effect either

View 9 Replies View Related

ActiveX Controls On Worksheet - Fmbackstyle

Feb 16, 2009

I have problems wit setting some ActiveX controls properties. If I place ActiveX on worksheet manually, it is diferrent object, then If I place it by VBA code. I, am not able to open properities window for controls created by VBA. When I open properties window for ActiveX created manually, there is property fmbackstyle. If I am trying to set this property by VBA for controls created by VBA, result is error.

View 9 Replies View Related

Conditional Disabling Of ActiveX Controls

Feb 28, 2010

I want to do disable certain ActiveX toggles depending on the value of a specific cell; this cell can contain more than one value that should disable that control. the logic works as follows:

IF Cell="A" THEN Toggle 1=Disabled AND Toggle 2=Disabled AND Toggle 3=Disabled AND Toggle 4=Disabled AND Toggle 5-Disabled

IF Cell="B" THEN Toggle 1=Ensabled AND Toggle 2=Enabled AND Toggle 3=Disabled AND Toggle 4=Disabled AND Toggle 5-Disabled

IF Cell="C" THEN Toggle 1=Enabled AND Toggle 2=Enabled AND Toggle 3=Enabled AND Toggle 4=Disabled AND Toggle 5-Disabled

IF Cell="D" OR Cell="E" THEN Toggle 1=Disabled AND Toggle 2=Enabled AND Toggle 3=Enabled AND Toggle 4=Enabled AND Toggle 5-Enabled

View 9 Replies View Related

Loop Through ActiveX Controls In Worksheet

Jun 22, 2006

I'm looking for a way to loop through the ActiveX controls (option buttons) in one sheet so that I can have these option buttons reflect what I select on the front sheet.

View 2 Replies View Related

ActiveX Sheet Controls Basics

May 3, 2008

i have been working on editting a game that i got off the internet and i was having trouble editing the buttons on the worksheet. they dont seem to be linked to a macro and i cant edit them or even delete them
it seems like they are forms but attached to the worksheet.

View 3 Replies View Related

Conditional Formatting For Multiple ActiveX Controls

Aug 11, 2014

I have a workbook with multiple sheets. I want to add conditional formatting for a cell on 1 worksheet based on if multiple ActiveX controls are checked (checkboxes) on another sheet. I have 10 checkboxes (now LinkedCells named "G1" -> "G10") on worksheet "Data Entry". The formula should be if all 10 boxes are checked on the "Data Entry" worksheet, cell "A1" on the "Milestone" will be gray. Any clues on how to write the formula for this Conditional Format?

View 1 Replies View Related

Excel 2013 :: Enabling ActiveX Controls

Apr 4, 2014

I bought a Surface 2 tablet. When I go to "settings" in the Trust Center it does not show any option to enable Active X.

View 3 Replies View Related

Programmatically Create ActiveX Worksheet Controls

Apr 2, 2008

I created a macro to create command buttons on sheet 1 of my worksheet. The created buttons using oleobject and class type: forms.commandbutton1, creates an object with no properties on the sheet (i.e. if you right click on it excel thinks it's an object and not a control.) Is there a way to create it as a control?

View 4 Replies View Related

Excel 2003 :: VBA / Reference ActiveX Controls In A Cell

Oct 12, 2011

In VBA (Excel 2003), I'm wanting to get a reference to an ActiveX comboBox that is inside/attached to a cell.

I can iterate thru all the OLEObjects in the OLEObjects collection of the Worksheet and test the .TopLeftCell property to see if it matches my target cell. However, this seems like a long way around the problem - particularly if there's hundreds of comboboxes in the sheet.

Intuitively, I would have thought there would be a Cell.OLEObjects collection, but it appears that there isn't.

Is there a quicker and easier way to get a reference to the OLEObjects within a target cell?

View 2 Replies View Related

Excel 2007 :: ActiveX Controls Command Button Opening Worksheet In Same Workbook

Feb 6, 2014

I 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).

View 1 Replies View Related

Macro (attached To ActiveX List Box) Running On Open?

Mar 26, 2012

I have a spreadsheet with multiple brands on it, and I've added an ActiveX listbox that allows you to select which brands you want to view (Brand A, Brand B, or "all brands"). It works great, however it appears that my macros are running on workbook open.

None of my macros (and there are several) have the "Workbook_Open" code in them, so I'm not sure what's going on?

It really doesn't do any harm, except that someone opening the workbook has to watch excel flash and blink and go through all of these steps/calculations evertime you open it.

I thought Excel might be treating the "workbook open" as me making a selection on one of my listboxes (even if it was already selected) and thus running that macro, but the same thing happens even if I save the workook to display a sheet that doesn't have a listbox.

ETA: From what I've read, activeX controls are always autoloaded when a workbook containing them opens. That's unfortunate. Am I out of luck here for a speedy workbook open?

View 6 Replies View Related

Adding Worksheet Protection But Allowing Form Controls - Macros

Jun 5, 2014

I have a worksheet with lots of things going on... the end user needs access to the Name field, DOB field, all the scroll and form control option buttons in the 9-question sheet, and the macro-enabled reset button at the bottom. Formulas are sprinkled throughout the worksheet, in columns T through AC... option button links go to AA and AB.

I would like to protect the entire sheet so none of the fields, except where indicated above, could be selected or edited... but when I protect the sheet, I get errors when trying to use you form controls, and the formulas do not respond. And finally, when protected, I get a debug error on the reset macro.

View 2 Replies View Related

Running Macros

Jul 28, 2006

I have a list of hyperlinks in excel with check boxes next to each, does anyone know how I can do a macro that will run another macro if the check box is checked and ignore the macro if it isnt checked???

View 3 Replies View Related

Macros Are Blocked From Running

Nov 19, 2009

When I send a workbook with macros to some of my users, they either can not open the workbook due to there being macros or they have to enable them each time the workbook is opened. I know there is a way to correct this, but I don't know how to look this up in help so I am coming to my trusted friends on Excel Forum. I would also like to know what this is called as I slightly remember that there is a name for this.

View 5 Replies View Related

Running Excel Macros On Mac?

Mar 18, 2013

I currently use an Excel program (with macros) that run weather forecast data. It is compatible with versions XP, 2003, 2007 and 2010. However, I am trying to figure out if I can run it on a Mac. My plan is to run windows on my Mac through Parellels or VMWare Fusion.

Here is a link to the Excel Program: TX Tornado Forecast Worksheet

View 2 Replies View Related

Automatically Running Macros

Dec 6, 2006

I have a macro created that at the mo is assigned to a button. But I would like the macro to run as soon as the spreadsheet is opened.

View 9 Replies View Related

Running Macros In Background

Feb 29, 2008

I usually run it on a different server while I work on another available server. However, if I am in Excel on a different server working, I cannot copy and paste in Excel (if I try to copy & paste, I end up pasting data from the macro). This makes sense since the macro is copying & pasting but is there any way around this? I purposely didn't past the code since it's huge but it has a lot of "cells.copy, activesheet.paste, etc".

View 9 Replies View Related

Slow When Running Macros

Mar 21, 2008

I have a simple Macro. I assigned to a Form button.

when i click that button systems takes lots of time to complete the macro.

left down task bar it say calcuating cells and load from 1% to 100% ...

View 9 Replies View Related

Running Macros On Event

Jul 3, 2006

Excel 2003

I have three macros:

Sub Concat()

ActiveCell.FormulaR1C1 = "=IF(RC[-1] > 1,CONCATENATE(""*"",RC[-1],""*""),"""")"

End Sub
Sub InsertLocation()

ActiveCell.FormulaR1C1 = "=IF(RC[-2] > 1, R[2]C[2],"""")"

I need To have them excecute automatically once data Is enter into a cell In column A:

I 've attempted onEvent configurations starting with -

Sub FillScanSheet()
ActiveCell.EntireColumn.Select
If ActiveCell > 1 Then
Application.Run Concat
Application.Run InsertLocation
Application.Run Dupes
End If

However I keep getting a circular reference error --

View 7 Replies View Related

Running Macros On Whole Workbook

Mar 23, 2007

I want to run a recorded macro on the whole workbook at once, not just on the active worksheet.

View 3 Replies View Related

Running Macros According To Folder Names?

May 15, 2013

I have to run several different types of macros depending on the folders. each folder contains several excel files. so what i want to do is if a folder has a certain name run a certain macro, Here is the code:

VB:
Sub Macro1() '//Change the path to the main folder, accordingly
Call RecursiveFolders("C:Path")
End Sub

[Code]....

then call macro 2 end what syntax code should go there?

View 5 Replies View Related

Running Macros From A Separate Workbook

Jun 9, 2008

Our department receives weekly and fortnighly updated workbooks from a number of different departments. Each workbook contains 10s of worksheets. Our department analyzes the data and generates reports from those worksheets.

I have developed a few macros to automate the report generation for making the computing of my colleagues easier.

Now, the problem is that all the macros are developed behind individual sheets and some modules. For this reason, my colleagues have to copy each updated sheet and paste over the older ones individually, each and every time. It is really quite time-consuming task - deleting older data from all the worksheets and then copying fresh data on each of them, one by one.

They want to make their life easier by just replacing the entire workbooks with the new ones and still want the macros functioning, as usual.

My concern is how I can put all the code in a separate workbook and how to reference data from the other workbook.

View 9 Replies View Related

Macros Are Running In Design Mode?

Apr 8, 2012

I have been writing VBA code in Excel for about 4 years, but I am self-taught, so I only know what I have had to learn. Recently, I learned that I could run a macro from a cell formula. I created several hundred cells (on multiple worksheets) that include calls to various macros. I only want to run these when I know they need to be updated, not every time I change a cell value.

I turn on Design Mode and try to modify my worksheet (adding or removing columns, rearranging stuff) and some macro(s), somewhere(?) execute every time. This can sometimes take 15-20 seconds for everything to update.

Did I hit some magic key sequence, somewhere? How is it that some of my macros, somewhere are running with Design Mode enabled (and turning it OFF, by the way)?

View 2 Replies View Related

Running Macros In A Shared Workb

Dec 14, 2002

Whenever I share a workbook, I experience problems running macros that are problem-free otherwise. I’ve read the help menu about restrictions of using shared workbooks, but I did not run across anything that might explain this behavior. I’ve experimented with a few spreadsheets and I run across this problem in all cases. Can anyone help with an explanation or past experience? I’m assuming that by sharing a workbook, the workbook is automatically protected for both windows and structure. If this is what is causing the problem, is there code I can use to still allow my macros to run trouble free in a shared workbook?

View 9 Replies View Related

How To Prevent Auto Macros From Running

Sep 11, 2008

I have made a vba program in excel 2003 that opens a worksheet using Workbooks.Open, and copies all the worksheets out into the program etc. The worksheets that I am opening have macros that automatically execute when the worksheet is opened (opening up some forms ). These macros are running when I open the file using VBA. How can I prevent this from happening. The automatically executed code in the workbook being opened is located in "this workbook" and can be seen below.

Private Sub Workbook_Open()
Dim CfileName As String
'Check Config sheet for template state
If Config.Cells(10, 3) = 1 Then
CustomizeDirInfo.Show
End If

If Config.Cells(10, 3) = 2 Then
GetConfData
GetGrpData
StdFileGen.Show
Else
Exit Sub
End If
End Sub

View 9 Replies View Related

Displaying Userform & Running Macros

May 11, 2006

I am copying web data into Excel and need a creative way to run a couple formatting macros on the data. I’m looking for the best way to initiate the macros. I cannot use command buttons because they’ll get deleting as a result of the line “DrawingObjects.Delete”.

I’d like to use a Useform with a couple buttons but am not sure how to have it automatically display when needed and hidden when not needed. I also prefer not using toolbars button unless they will only be displayed in that workbook and not any others.

View 9 Replies View Related

Running Macros On Protected Sheets ....

Feb 19, 2007

I have the following code as workbook module but it is not working, I have tried fiddling with it but I cannot work out what is wrong, can anyone help please.

Private Sub Workbook_Open()

Dim ws As Worksheet ....

View 9 Replies View Related

Macros Cannot Be Found, Running On Another Computer

Sep 21, 2007

I have sent an Excel application to a colleague's computer. When she tries to access/run any of the macros (assigned to buttons), Excel displays and error inidcating that they are not found.

Looking under Tools/Macros they are there.

On my computer the a macro name is for example "Submit", preceded by the full path and file name. On the colleagues computer they show up as "Module5.Submit" (with the current path and filename), where the module number is the actual module number displayed in the VB Project.

Is there a VB setting that is responsible for including the module number and how would I turn this off?

View 9 Replies View Related







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