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
ADVERTISEMENT
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
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
Mar 21, 2014
I have done a Scenario and they list the cell address (example R2C35) in the Report - the cell has the text "R2C35" in it.
I want to get the contents of a cell 2 columns to the left of Cell R2C35.
So what would I use for the Reference Cell in the Offset formula?
View 8 Replies
View Related
Nov 28, 2013
I've got 2 worksheets in the same workbook.
Sheet 1 contains huge amounts of data - thousands of rows and multiple columns
Sheet 2 - I want to extract the data from sheet 1 column A into sheet 2 column A but only the data from every 21st row.
I want to be able to copy the formula automatically down, otherwise it will take hours to do it manually. So far I can only get the cell reference to increment by 1 each time after copying.
So what I'm trying to achieve is :-
Sheet 2 A1 = Sheet 1 A1
Sheet 2 A2 = Sheet 1 A22
Sheet 2 A3 = Sheet 1 A43
View 3 Replies
View Related
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
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
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
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
View Related
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
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
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
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
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
Feb 11, 2013
Using the developer tab I inserted an Active X combo box. Under properties I referenced a 'linked cell' that I want the data to appear in. This box works great as long as I keep the sheet open. Once I save and close the workbook and re-open, that reference is lost. It shows #REF! in that field. Why does it lose the reference? I have tried to reference a cell on the same sheet as well as a cell in a different sheet and it keeps the sheet name but not the individual cell.
View 13 Replies
View Related
Nov 21, 2011
How do you create a reference number to be posted in a userform2 that is opened from an earlier userform1 where you have entered some initialisation data and generated a source reference number. ie set of data has reference X and there will be y items in that set want references in form X01 to Xy (y unlikely to exceed 20). Want to put references 'X01' into the userform2 and cycle through data entry in userform2 from source reference X01 to Xy. (I'm having problems with the transfer from 1 to 2!)
View 2 Replies
View Related
Aug 16, 2013
I have a sheet (sheet 1) of employee information for multiple buildings as follows:
Employee Name, Building, Pay Grade, Full Time Equivalent (of full time hours worked)
Anne, Centre A, Anne, Grade 2, 1.0
Bob, Centre E, Bob, Grade 3, 0.50
Carl, Centre H, Carl, Grade 2, 0.60
Dan, Centre B, Dan, Grade 1, 1.0
Emma, Centre A, Emma, Grade 3, 1.0
Fash, Centre A, Fash, Grade 2, 0.40
Gemma, Centre C, Gemma, Grade 2, 1.0
Hanna, Centre B, Hanna, Grade 1, 1.0
etc, etc, etc
From another sheet (sheet 2), I wish to populate the total of "Full Time Equililents" at each grade in each centre, eg:
CENTRE, GRADE 1, GRADE 2, GRADE 3
Centre A, 0 1.4 1.0
Centre B, 2.0 0 0
etc,etc,etc
I'm using Excel 2003 if that makes a difference
View 2 Replies
View Related
Feb 15, 2013
I'm using excel 2003 and using VBA I want to convert data from my original data below.
The first row is just to identify the columns below it.
REFR1,REFERENC2,COMPANYNAME01,CURNTDATE,QUANTITY,ITEMNUMBER,PRICE
71723,121222010,EXAPLECOMPANY,2-13-2013,1.0000,MPG TBS01 TB,65.9900
71723,121222010,EXAPLECOMPANY,2-13-2013,1.0000,MPG TBS01 CH,86.5800
71721,121221142,EXAPLECOMPANY,2-13-2013,1.0000,MPG PB01,75.9900
71718,121234503,EXAPLECOMPANY,2-13-2013,2.0000,MPLC001,146.9900
71718,121234503,EXAPLECOMPANY,2-13-2013,1.0000,MPMC001,120.9900
71720,121238748,EXAPLECOMPANY,2-13-2013,1.0000,MPS007,63.9900
To be converted to the following:
"COMPANYNAME01",
"TOTALITEMS","REFR1","REFERENC2","CURNTDATE","0","0.00","0.00"
"ITEMNUMBER","QUANTITY","PRICE","TOTALPRICE",
"EXAPLECOMPANY",
"2","71723","121222010","2-13-2013","0",,"0.00","0.00"
"MPG TBS01 TB","1.0000","65.9900","65.99",
"MPG TBS01 CH","1.0000","86.5800","86.58",
[Code] ..........
The converted output data above can be within the same document or output to a text file.
View 1 Replies
View Related
Nov 11, 2012
I am running Excel 2003 on a Win7 system.
Here is my situation:
Each of my data sets spans roughly 75 columns by 250 rows at present, but this could expand. The first 7 rows contain metadata. Columns 2-25 or so contain the raw data, from which everything to the right is calculated. The data sets have most columns in common, but not necessarily all.
In order to tease out the most meaningful information from my data, I frequently sort all or part of it based on varying criteria. When I find a useful sorting criterion, I create a new column with a header that describes the criterion and populate it with a formula that returns a 1 if the condition of interest is met for that row, or a 0 if it is not. For example, if I am doing this in column AA, I might enter
=--(AND($AX8>$AA$4,$Y8>0))
and copy it down to the end of the data. The resulting vector of 1s and 0s quickly re-identify data that meets that criterion even after subsequent resorting. It also makes locating data that meets multiple sorting criteria extremely simple. Essentially, I create a truth table.
Cell $AA$4 in the above example contains a "comparator" value I might wish to change at some point, which would change the subset of data the condition selects for.
Here's the first hard part:
For each data set, I need the ability to generate meaningful plots that includes separate series based on the criteria I have described. However, I also need to retain the ability to resort the data or change the comparator value without disrupting these plots. In other words, the plots must NOT change when the order of the data is changed, but MUST change to display the appropriate data when the comparator changes.
Here's the 2nd hard part:
Once I have this working for one data set, I need to be able to port it to other data sets (which are contained in other workbooks), so that I can compare equivalent plots from each. I also need to minimize the number of manual steps involved in doing so, to avoid human errors and excessive time consumption.
The only other possible complication I can think of at the moment is that, to this point, I have been inserting blank rows to isolate subsets that I do not wish to perform further sorting on from each other.
Right now I am angling toward VBA code that loops through the entire data set to generate base dynamic ranges using the column header row (row 1) as the names, and the entire column of data for the rangeloops through the truth table columns to generate "branch" row ranges for each of the sorting conditions,loops through the entire data set one more time to create "branch" ranges for each of the base ranges.
I could generate some code to accomplish a one-off solution for a given configuration of a single data set (provided there is not a list length limit in a chart series that I'd be violating)...but without a dynamic named range, I don't know how to get to something that would update appropriately. So in essence, I am still stuck at the dynamic range part of this.
View 1 Replies
View Related
Mar 19, 2013
Is there a way in VBA to reference the activeX button which has been clicked? Like a ThisWorkbook equivalent for a button?
I have quite a few button whereby they set a parameter for a procedure 'TrendData' based on the row they sit in. Currently I just have the row number hard coded i.e. Call TrendData(5) but I want to amend this so that when I add a row it doesn't offset all my buttons.
For Example
Call TrendData(CommandButton3.TopLeftCell.Row)
However instead of typing CommandButton3, CommandButton4, etc. I would like the code to know which button had been clicked and just use that?
View 9 Replies
View Related
Apr 10, 2008
How do I reference the value contained within a combobox using VBA?
I have tried the following:
ActiveSheet. OLEObjects("cmbSearchType").Object.Value
ActiveSheet.OLEObjects("cmbSearchType").Value
Sheets("mySheet").OLEObjects("cmbSearchType").Value
Sheets("mySheet").OLEObjects("cmbSearchType").Object.Value
I'm wanting to use the drop-down combo box as a simple way for the user to choose what type of search they wish to perform on the spreadsheet. The search algorithm chosen depends upon the current value show in the combo box.
I am using Excel 2007.
View 7 Replies
View Related
Sep 3, 2007
I am using excel vba to control IE page with a variety of forms / inputs .
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
ie.Navigate (URL)
Call ie_wait(ie)
ie.Document.all.loginID.Value = USERNAME
ie.Document.all.PASSWORD.Value = PASSWORD
ie.Document.forms(1).submit 'login
I am trying to control a drop down box in a HTML page
<select name="attv_39721_5004" onchange="executeRules(this, '39721', '5004', 'attv_', 'Choose...')">
<option value="0">Choose...</option>
<option value="8140">1</option>
<option value="8141">2</option>
<option value="8142" selected="selected" >3</option>
</select>
and i will normally use
ie.Document.all.attv_39721_5004.SelectedIndex = newS
The problem is the unique name for the html select drop-down box changes always!! i.e. it may not always be "attv_39721_5004"
Thus I am not able to use the above method. Does anyone have a different method to changing this values?
View 3 Replies
View Related
Nov 17, 2006
I have a userform with fields (TextBoxes) Num1, Num2, Num3, Num5 and Num5
I also have an array which i have looped through and seeded with five values.
Now when I try and loop again and pass the values from the array to each of the textboxes I cant remember the syntax to reference the textbox using the loop variable - Num(var). I've experimented with the & symbol but it escapes me at the moment !
View 3 Replies
View Related
Feb 4, 2008
I have a fairly big excel spreadsheet with about 2 userforms at the moment. One Userform (the main one) has a multipage control with about 12 pages. Now here is the weird part. I open up the excel document and this main user form loads up simply with this code
Sub Auto_Open()
Load Userform1
Userform1.show
End Sub
This works fine the form loads. Now on this form there is a multipage control with about 12 pages as mentioned above. Now everything works the way I want it to eg the text boxes, combo boxes, command buttons etc all work and link with the worksheets fine just the way they should...But if I reference or try to use a couple of the controls in any way excel crashes. It doesn't give any errors or anything it just crashes and then I get a prompt saying do you want to send the error report blah blah. I have narrowed it down to 3 command buttons and 1 combo box so far that this happens on. If I do the most basic of commands on any of these controls such as something as simple as msgbox problemcombobox.visible...
View 2 Replies
View Related
Jan 9, 2007
I located combobox on userfom and don't see it in the module.
View 7 Replies
View Related
Mar 31, 2008
I have a sub that I need to call multiple times. I'm trying to figure out if there is a better way to do this rather than write out the call each time:
AYForm = "UserForm2.txtAYMonths" & i
AYPForm = "UserForm2.txtAYPercent" & i
SummerForm = "UserForm2.txtSummerMonths" & i
SummerPForm = "UserForm2.txtSummerPercent" & i
JobForm = "UserForm2.cboJobClass" & i
NameForm = "UserForm2.txtName" & i
For i = 1 To 15
Call FormatAY((AYForm), (AYPForm), (SummerForm), (SummerPForm), (JobForm), (NameForm))
' Call FormatAY(UserForm2.txtAYMonths & i, UserForm2.txtAYPercent & i, UserForm2.txtSummerMonths & i, _
' UserForm2.txtSummerPercent & i, UserForm2.cboJobClass & i, UserForm2.txtName & i)
Next i
the sub FormatAY has six arguments; 5 textboxes and 1 combobox. Since the names of these items are the same except for a number (example UserForm2.cboJobClass1, UserForm2.cboJobClass2, UserForm2.cboJobClass3 etc...), I wanted to write a for loop and use a variable to represent the last number. Is this even possible? The couple of ways that I have tried this, I get either a member not found, or ByRef error.
View 6 Replies
View Related
Jan 26, 2006
I need to match data in cell A to cell B and then if they equal I need to copy the adjacent cell C to cell X . How do I set up a macro to do this automatically? I have over 5000 cells to compare and match up.. I have Office 2003.
View 7 Replies
View Related
Sep 1, 2009
Using Excel 2003, is it possible to use 2 sumif functions in one cell?
i.e., sumif and sumif
View 5 Replies
View Related
Feb 21, 2014
I am using Excel 2003 at work.
New cases are entered on to the spreadsheet. The case remains open until a closure date is entered, at which point the case is closed. What I need is the following:
Cell A3 = should say "Open" if there is no value in cell Y3
Cell A3 = should say "Closed" if a date or any value is entered in cell Y3. Ideally it should only say "Closed" if a date is entered in format xx/xx/xx, but am flexible so that it says "Closed" if any data is input.
At the moment Cell A1 has a drop down list consisting of open and closed. I will remove this if it causes complication.
View 5 Replies
View Related
Jan 2, 2014
i'm using excel 2003 and i'm trying to mark 7 cells in a row by conditional design by one of the cell
example : if the date on january? mark all line in yellow, for february mark in red and ect
A B C
528602545 assafsarit@walla.com 01/01/2013
527271005 eti_sh6@walla.com 01/01/2013
[Code] ...........
View 4 Replies
View Related