I am designing a skill assessment questionnaire and want to use radiobuttons to keep it user friendly. I have about 100 line items with 6 radiobuttons and 1 checkbox. I want to assign a linked cell to each button and group the radiobuttons of each row (plus set a default value.) As the number of buttons is large I am looking for a way to do this efficiently without manually changing the GroupName in the properties window. Currently, I create the buttons automatically but cannot change the desired attributes (groupname and linkedCell) unless I explicitly address the respective button by its name directly.
This it not practical though due to the large number of buttons in the spreadsheet.
Currently I try to address the buttons with other variables but this does not work. my current code is the following (for only 5 rows and 2 buttons per row):
Sub Buildbuttons()
Dim RowNo As Integer
Dim i As Integer
Dim x, y As Integer
Dim xdif As Integer
Dim ydif As Integer
Dim LinkOB1, LinkOB2, LinkOB3, LinkOB4, LinkOB5, LinkOB6, LinkCB1 As String
Dim OB1, OB2, OB3, OB4, OB5, OB6, CB1 As String
Dim MyRange As String
' now of rows to fill
RowNo = 5
'define starting position and distances
x = 20
y = 5
xdif = 54
ydif = 18
i = 1.................
I'm trying to enter text (the Assessment Number) into a website text box. the site is Solano County - Online Tax Information the relevant section of website code is
My code is
Sub Solano_View() Dim IE As Object Dim url As String Dim tags As Object Dim tagx As Object Dim parcel As Object
[Code]...
This is creating Run Time error code 438 I've also seen Run time error code 91 while trying other methods
I have also tried getElementById() without sucess
Does this have something to do with tables or java?
Should I be using $("#id") I don't know how to use this though.
I am trying to develop a questionnaire spreadsheet using a ranking system. I have different questions (based on certain criterias) and four columns for each question: NEVER | SOMETIMES | MOST OF THE TIME | ALWAYS.
I want to see if there is a way that I can lock the other three cells when the user has chosen a particular column by typing an X. BY doing so, I want to ensure that the user will not choose two options (or columns) instead of only one, because if he/she does it will mess the other calculations that are not shown within the table. Only the input and output are shown.
As part of an audit program I have a questionnaire. One of the questions has 10 check boxes, one with a combo box and one with a text box. The user will check at least 2 or more answers, but not all 10. (2-4 average). I don’t want to link the answers to specific cells, because I don’t want the answers to display with blank rows between answer on the sheet. I want the answers to display in 2 columns evenly distributed.
I would prefer, to not have to run a macro, if possible, but the only way I could see to do this is a very long if statement base on every combination of answers. If the only way to do this is thru a macro, I would prefer to tie it to the printing of the sheet, or I could make it part of an error checking macro I plan to do. The actual question is in the attached file
I have created a worksheet to track/calculate compliance with a number of important items at a number of business locations on a number of questions. This workbook will be posted on a central server that will allow 25+ employees to access it from the field and "double-click" to enter an X in either a "Yes" or "No" column for about 100+ locations (the code also will remove the "X" in either column if another "X" is entered into the other column to prevent double entries). The workbook will be quite elaborate and will be locked down except for those cells unprotected for data entry (identifying location, date, etc.).
Below is the code and it works just fine as written with two columns to chose from to "double-click" and enter an "X" (columns C & D for rows 4 thru 15). I want to "freeze frames" locking columns A & B and allow scrolling to the right to enter each New Location and allow the same code to apply to the same rows but column groupings of E & F, G & H, I & J, ...until I have about 100+ sets of two columns identified in the code.
I have tried a variety of changes to the "Union(Range" and "Intersect(Target, Range" last night and this morning to no avail and have gotten nothing but a headache and a desire to drink heavily from the exercise.
Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Range, Cancel As Boolean) Dim rInt As Range Dim rCell As Range
Set rInt = Intersect(Target, Range("C4:D15")) If Not rInt Is Nothing Then For Each rCell In rInt rCell.Value = "X" Next End If Set rInt = Nothing Set rCell = Nothing Cancel = True
I created a form using multiple text boxes and combo-boxes using Excel VBA controls but do not know how to enable the ability to tab between those boxes. "Auto Tab" doesn't seem to do it.
I have added subtotals to a worksheet, as I have many times before, but this time I don't see any controls off to the left. I am at a loss as to why this might be happening or how to get them to display. Have I toggled something off or on that might be causing this?
My excel macro's run fine under Windows 2000 Pro, and Office 2000. The company got a new computer with Windows XP. I now have macros that run OK however I keep getting a pop up message stating. Warning..An active X component is being loaded. I must press OK and the program will run fine. How can I get rid of the Pop up active X message.
way of setting the values of textbox controls, the way im using below is very repetitive and has to be run through every time a combobox1 is changed. Im also going to have to add a lot more case scenarios in the short future.
Private Function setform() Dim Xeng As Boolean
For Each ctl In Me.Controls If TypeOf ctl Is MSForms.TextBox Then ctl.Enabled = True ctl.Locked = False ctl.Value = "" End If Next
I have a ListBox in my worksheet "A", and I'm tryin to acces to it... I want to use that ListBox like a log to print the error i have found while running my code. The name of that ListBox is "IncongruenciesListBox".
now if that ListBox was in a userform, i can access to it easily, but if it is in the worksheet how can i change (add more rows) to it?
I tried:
Dim WS As WorkSheet Set WS = ThisWorkBook.WorkSheets("A") If added = False Then WS.IncongruenciesListBox.AddItem ("error")
And there is a message saying it cant find "IncongruenciesListBox".
I have a userform that has nested multipages (5 in the outer page, 4 in the inner page).
On each of these multipages, I want to have the same controls (sliders) laid out in the same order - but with unique names, named after their tab location, for each control so I can use their value property later in the code.
I've designed the layout and named all the controls on my first sheet (e.g. Slider1Outer1Inner1). I now need a way of automating the replication of these across the other 19 sheets (including the nested inner multipage!); so that equivalent slider for example would be called Slider1Outer1Inner2, Slider1Outer1Inner3 etc.
I'm not sure about coding VBA to act on items within VBA...
VB: " For each multipage in outer For Each multipage In inner For Each Object In current multipage Copy inner.object -> Next multipage Inner.object.name = CurrentOuter & CurrentInner & CurrentSlider "
I have a spreadsheet with numerous check boxes. Everything looks great when I do a "print preview", but after I close the preview and return to the spreadsheet, a bunch of the check boxes have moved! Have I got a property improperly set, or is it something more sinister? I've looked all over, and can't find an explanation of what the various property settings mean...
What's the best way to hide controls on a userform? I have a userfrom with 2 datepicker one for start date and one for end date. I want them hidden until I use checkbox and check it to appear. I am using this code but nothing is work.
I have two linked ComboBoxes on a form. There are 10 Textboxes populated by ComboBox2’s choice. These controls are situated on two frame controls which are used for visual groupings only. I would like to clear everything except Combo1 when Combo1’s value is changed. ( Combo1 is a filtered key list using the dictionary. Script code)
I’ve written a small sub that is called to clear the textboxes, but its not reliable every time. It seems that if the scroll bar is used, and the user chooses Combo1 choice “NUTS/SEEDS”, the boxes aren’t cleared. In fact it will show the “Walnuts” info in Combo2.
I have two radio buttons. Let's call them Button_1 and Button_2. They both have code behind the click event.
One of the lines in the Button_1 code makes the value of Button_2 false. If Button_2's value at the time is true, the Button_2 click event fires off and runs through it's code.
How do I disable Button_2's click event in this scenario so the value changes, but the code in it's click event won't run?
I tried application.enableevents = false, but that didn't do it.
Is there a short way to clear text boxes, check boxes and option buttons in one command. I dont want to delete them I want them to be able to accept more data once the operator has finished
I have form controls on my worksheets. How do I hide them? When I hide the row, the controls stay there. These controls don't seem to have that visible property like the VB control.
I'm thinking of using a validation->list instead, but then you don't see the drop down arrow.
I have a number of TextBoxes across the page, all set to Visible=False.
If these get filled with data then I need to set Visible=True.
Rather than hard code this individually for each one (which is not a problem, it just looks untidy), can I select each row as a Group (whilst designing the form, not in the code) and then set that Group to Visible=True ?
I have a userform with a large number of textboxes. Say 100. I want to clear them all after the user submits the data to the spreadsheet. Essentially resetting the userform.
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
I have a userform that contains several textboxes, checkboxes, and comboboxes. There are also some command buttons, one of which says clear all. What I want to do is loop through the controls and clear the contents or change the value to false, depending on the type. I can do this by type the name.value = "", but there are alot of controls. If possible, a loop would be much more effecient.
I am trying to create some controls in a userform on the fly based on the data in a sheet. The part of my code is the following:
summaryForm.Controls.Add bstrProgID:="forms.label.1", Name:="LAWts", Visible:=True With summaryForm.Controls("LAWts") .Top = 120 .Left = 20 .Height = 18 .Width = 300 .Caption = "Weights: " End With
Question I is that how can I connet this textbox to a click event or just to a procedure when it is clicked? I tried to use OnAction but it does not work for textbox in a userform. Question II is that how can I find the all properties of a textbox or any other controls? Is there a manuel or reference available on the internet?
I'm trying to skin an Excel VBA userform and all the controls on the form. I found a very good example that skins a userform via a class module. It doesn't however skin command buttons, text boxes etc. I imagine the techniques would be similar.