FAQ Database Discussion Community
excel,vba,excel-vba,listbox,userform
First of all I would like to thank all of you guys. Maybe you did not notice but you help me to grasp VBA to some level from scratch. I am still in learning process so I may be missing something really simple, please be gentle :) First of all...
excel,vba,excel-vba,userform
I have a userform with which the user can use command buttons to scroll through the data, some of which is displayed in text boxes. I have a 2 comboboxes, one dependent on the other, which use case statements. I want to use these combobox selections to update the original...
excel,vba,excel-vba,userform
I used the code that was responded with in the link I have attached below and I am having some problems can you please help me? VBA Dialog box to select range in different workbook When I click on the refedit box to be able to select the range I...
excel,excel-vba,combobox,userform
I have a userform that works fine. Now I need to edit some values I selected using the userform,so I want to open the userform with the values already selected. I already have the userform that saves the values in some sheets, I try to open the same userform but...
vba,userform
I have a listbox on a userform that I am populating from an external workbook. If I keep the source spreadsheet open the listbox dispays correctly. When I close the external workbook the listbox seems no longer displays correctly and if you scroll the listbox text is replaced with a...
excel-vba,filter,combobox,userform
I have a userform set up which contains a ComboBox. The ComboBox is populated with values which are pulled from a range of cells which have been defined in the Name Manager (range of A1:A5 stored in a separate sheet.) The default caption for ComboBox is "Select Office" On the...
excel,vba,dynamic,checkbox,userform
I have Command Button which is required to show a User Form Dynamically as Below, with the Column Headers fetched from a Record Set as a Check Box Option. The Code that I Have for Initialize is as below Private Sub UserForm_Initialize() Set xl1 = Excel.Application Dim xlXML As Object...
vba,excel-vba,textbox,infinite-loop,userform
I have an UserForm with 5 TextBoxes, and each time one is updated I recalculate the others. But how do I avoid a "infinite loop" as the first will recalculate second which will recalculate the first and so on... Here is a part of my UserForm's code, only the TextBox_Change(s)...
vba,userform
I created an UserForm, and I'm updating a lot of things on the ComboBox_Change event, including some Labels' caption using this : Me.Lab_LastVal.Caption = Replace(Me.Lab_LastVal.Caption, "Currency", Me.ComboBox1.Value) Me.Lab_NewVal.Caption = Replace(Me.Lab_NewVal.Caption, "Currency", Me.ComboBox1.Value) The problem is that when I do it once, it won't work because Currency will have disappeared of...
excel-vba,userform
Sure this is very basic, I had userforms that I had not named and I called these by using UserForm1.Show. Now I have named these eg. ProgressBar. I call this one by UserForms.Add("ProgressBar").Show vbModeless But i cant figure out how to make this bit work: Private Sub UserForm_Initialize() 'With UserForms("ProgressBar")...
excel,vba,excel-vba,userform
I have a userform with 2 refedit boxes. They both allow the user to select a cell. I have a label underneath each refedit that i would like to show the text of a specific cell on that row (not necessarily the selected cell), I guess it would be something...
excel,vba,excel-vba,userform,multipage
Good morning! I have an User Form in VBA Excel with multiple Pages. I want to create a command button ("Next" button) that allow the user to change the page. What code should I use? ...
excel,vba,excel-vba,userform
I have a userform with few buttons for different macros to run. At the end of execution of macro it hides the userfrom. I have resablled the close button of userform with the following code: Private Sub UserForm_QueryClose _ (Cancel As Integer, CloseMode As Integer) ' Prevents use of the...
vba,userform,optionbutton
I need to create several option buttons in a Userform (each one for a array element). Am I missing something here? Cause it returns an error.. DefaultTop = 60 For X = 0 To UBound(ArrPlants) Set Jonas(x) = SAPPlants.Controls.Add("Forms.optionbutton.1", Y, True) 'Error on the above line ^^^ With Jonas(x) .Top...
excel-vba,error-handling,userform
Okay so here is the problem: In my user form, I have 2 checkboxes. I want to be able to use the value of the checkbox to perform a certain job. Example: Sub main() UserForm1.Show If UserForm1.CheckBox1.Value=True Then MsgBox("Awesome") End If End Sub Now my problem with this is that...
excel-vba,userform,private-methods
i have a series of userforms that will run in sequence, and i need a button that can RE-show the previous userform, i've tried the code below but it gives a error telling me that this userform has already been show, i'm clueless about how to get this done, here...
excel,vba,excel-vba,userform
I created a UserForm with several functions. The form opens as I open the Excel file, however if I try to close the form the Excel file close together. Additionally, I can't open the VBA of this Excel (containing the form), so what I do (and that is really dum)...
vba,excel-vba,userform
I developed an UserForm to ease DataBase inputs for one of my projects. In this UF, there is a TextBox dedicated to a numerical value. I use this code to avoid text entries : Private Sub TextBox1_Change() If Right(Me.TextBox1.Value, 1) = "." Or Right(Me.TextBox1.Value, 1) = "," Or _ Right(Me.TextBox1.Value,...
arrays,vba,listbox,userform
I've been searching around online, and just want to know how to add a bunch of ListBoxes from my Userform to my array. Here's what I have so far: Dim LBArray() As Variant Private Sub UserForm_Initialize() ReDim LBArray(7) As Variant FirstNameTextBox.Clear LastNameTextBox.Clear HotelCIDate.Clear HotelCODate.Clear HotelNameBox.Clear HotelConfStatus.Clear HotelConfNumber.Clear LBArray(0) = FirstNameTextBox...
excel,vba,user-interface,excel-vba,userform
I'm trying to make this user form output option button results at the end of a column. Originally I tried using the same i in the for next loop that I have in my main module, but the user form wouldn't recognize the variable, even after dimensioning it as public....
excel,excel-vba,listbox,userform
I have a userform with an OK and Cancel button and a listbox. It is supposed to populate using this code: Private Sub UserForm_Initialize() Me.StartUpPosition = 0 Me.Top = Application.Top + (Application.Height / 2) - (Me.Height / 2) Me.Left = Application.Left + (Application.Width / 2) - (Me.Width / 2) With...
vba,excel-vba,radio-button,userform,optionbutton
I read somewhere that once an option button (or radio button) is selected on a UserForm, click events are not registered. Is this true? If so, what are some good ways around this, aside from using checkboxes instead? Thanks! UPDATE: Per user3561813's suggestion, I tried the MouseUp event with the...
excel-vba,combobox,userform
I have a piece of code in a module: UserForm1.Show UserForm1.ComboBox1.clear UserForm1.ComboBox2.clear UserForm1.ComboBox1.List = Array("xxxxxxx", "xfdshthr", "tyetrert") The user runs this code to bring up a userform with 2 comboboxes, the second of which needs to be cleared after the user has entered a new value in the first. Bizarrely...
vba,excel-vba,userform
Here is the code for the UserForm that I'm building, everything run smoothly with a test Array. I'm looking for partial match with the public function GetMatchingArt, which is fine on his own, to add an OptionButton for each match. But when I try to call this function in the...
excel,combobox,populate,userform
How do you populate a combobox with values from a given range on a mac. I have been searching for answers for the last hour but none of the solutions seem to be working. I have a userform called Details and a combobox called CurrencyList that I would like to...
loops,excel-vba,controls,togglebutton,userform
I am trying to loop through two sets of controls on a userform. If a combination of two controls (togglebuttons) are true then do something. The sub is called from the userform where the controls are created. This is the first time I've used the userform control variable, the code...
excel,vba,excel-vba,userform
So I have an excel workbook that opens userform1 on the workbook open event. Once certain conditions are met on userform1 it calls a procedure that loads and shows userform2. Userform2 has a label, a textbox and a button. This issue I have is that the events for the textbox...
excel,vba,excel-vba,listbox,userform
I have posted this problem before, however, I think it was overly complicated and I didn’t explain it very well. This time I am just using a simple UserForm as an example. I want to populate a ListBox by entering search criteria in a Textbox. I have three columns: Column...
excel,vba,excel-vba,userform
I would like to know how I can horizontally align to center textboxes and labels inside a Frame in VBA. Basically, I want each text box to be placed at the center of the Frame with the corresponding label next to it.
excel,vba,excel-vba,events,userform
I am writing a VBA application in Excel. I have a Userform that dynamically builds itself based upon the data contained in one of the worksheets. All of the code that creates the various comboboxes, textboxes and labels is working. I created a class module to trap OnChange events for...
excel,vba,excel-vba,cell,userform
Ok, the problem is that im working in a excel userform, but i cannot find a way to do a comparation between a textbox value and a cell value and if some statement is meet it will write other value to another textbox (the program is has already been made...
excel,vba,combobox,textbox,userform
In my excel document I have the following information in two columns: US Dollar (USD) 1 British Pound (GBP) 0.63 Guatemalan Quetzal (GTQ) 0.13 Honduras Lempira (HNL) 0.046 Other Please give factor Other Please give factor Other Please give factor Other Please give factor I have a combobox that is...