1. M

    Opening .xlsx file and changing a form control label using a .xlsm workbook

    I have a workbook that opens another workbook. Can I control the caption on a label using a separate workbook that is running all my code? Below is my code... but I have an error in the last line. Private Sub CommandButton1_Click() Dim Wbk1 As Workbook Dim Pth1 As String Dim...
  2. A

    How to Use a Variable to Control the Number of New Rows Inserted

    I'm using this line of code to add 12 empty rows at the top of a worksheet Var_RawData_Worksheet.Rows("1:12").Insert shift:=xlShiftDown I'd like to use a variable to control the number of rows but can't figure out the syntax, what I need is something like: VARIABLE_NO = 12...
  3. M

    [VBA] For next require vs for each

    Sub D_W() Dim X As Range, Y As Range For Each X In Range("B3:g3") Set Y = Range("J5:Q10").Find(X, LookIn:=xlValues, lookat:=xlWhole) If Not Y Is Nothing Then Y.Interior.ColorIndex = 6...
  4. M

    Can a macro select items in another macro's UserForm's ListBox ?

    Hello everyone, I have a macro that I wrote that duplicates a selected range at some position in my worksheet. The position is selected based on informations given by the user through an UserForm's ListBox. This macro works well and I would now like to determine its runtime depending on the...
  5. R

    [VBA] Date as serial appears in one cell, Americanised date in another.

    Hi all, same kind of issue as a few days ago.. NewIndate = Format(DateValue(InDate.Caption), "dd/mm/yyyy")NewOutdate = Format(DateValue(OutDate.Caption), "dd/mm/yyyy") If NewIndate = "" And NewOutdate = "" Then MsgBox "Please ensure you have entered a date or date range in the Control...
  6. M

    Is it possible to add a parameter in the UserForm_Initialize() function ?

    Hello everyone, So, yeah, the question is in the title. Can I for instance write something like Private Sub UserForm_Initialize(rowCount As Integer) and call it in my macro with myControl.UserForm_Initialize(rowCount) and expect it to work ? Thanks you for reading, Marie
  7. T

    How to Overlay a User Button on a Worksheet to activate a macro when clicked?

    Seems like a simple but I can't get it done. Tried a User Form with a Control Button: can't get it to overlay om my Worksheet.
  8. K

    Change the line spacing between items in a VBA listbox

    Hi Guys, I'd like to change the line spacing between items in a VBA listbox. Let's assume I display month names in a listbox control. Name of my listbox is "Lista". It's easy, I just add one line to "Private Sub UserForm_Initialize" for the userform: Lista.List = Array("January", "February"...
  9. Nitehawkhp

    Control Userform labels and buttons with VB macro

    Hello, I'm trying to control various labels on a Userform. Some of the things I want control: Change color of a button based on whether it has been clicked Is it possible to make a button visible or invisible by a macro? I have tried to use the following to accomplish this: Label56.visible...
  10. P

    Need EXCEL To go get info for me and return dollars

    This is going to be long and tedious, or I am just simple minded. I would like to have a database of information (Control) on one sheet, and import data on another sheet, and have a formula compare that to the control and if it finds a similarity I need it to tell me how much money is invovled...
  11. Nitehawkhp

    Assign a Userform to a control button on a worksheet

    I need help creating a control button on my worksheet named 'Data Validation'. That will open a Userform named 'AdjustResetButtonForm' containing the follow code: TextBox1.Value = Sheets("Data Validation").Range("X3").Value TextBox2.Value = Sheets("Data Validation").Range("X4").Value...
  12. R

    LoadPicture Command throwing error

    Good day, I have a userform with 31 image controls (on for each day of the month of May) which populate with pictures from a folder that are all contain dates (again in May) in the name. I then extract the date from the filename and find the correct image control to place it in. The code...
  13. T

    control your sheets data filter with one sheet

    i have 4 sheets each sheet has a Filters with data i want to combine this sheets in one Worksheet so i can control & modified them easy without getting to them Exemple like in the picture
  14. T

    control your sheets data filter with one sheet

    Hello Kings of excel i have 4 sheets each sheet has a Filters with data i want to combine this sheets in one Worksheet so i can control & modified them easy without getting to them Exemple like in the picture
  15. C

    combining sheets into 1

    Hi all. I have a worksheet that contains 8 sheets, 6 data sheets(data 1, data 2 etc), 1 control sheet and a combined sheet. I'm trying to combine the data sheets into the "combined" sheet and exclude the info on the control sheet. each data sheet is setup identical with headers in cells B2:K2...
  16. M

    Transfer of data

    Hi All Hopefully someone can point me in the right direction with this problem. We are trying to get away from having paper copies and go digital with batch cards at my work. At the end of each week we print out a weeks worth of batch cards, the operators use the cards for recording...
  17. S

    Dynamic Picture Viewer

    Hi, I have a list of image file names (minus the extensions) in column A and an Image ActiveX control embedded on Sheet1. Could you help me with a code that would access and display the images? For instance, when a cell in column A containing "Image1" is selected, Excel should access...
  18. A

    Microsoft Date & Time on VBA UserForm

    Hi, Expert I am new in a Excel. I went to get you expert solution for creating a VBA. I Can not Find "Microsoft Date & Time Picker Control 6.0 I Find only Microsoft Outlook Date Control. But Do not work it. Please help.
  19. S

    Programmatically creating Pages and Textboxes in a Multipage control using VBA

    Hi all, I'm trying to programmatically create a page and a textbox within a Multipage control and I am receiving the following error - "Run-time error '13': Type mismatch The code is as follows: Private Sub btnReset_Click() Dim pagNew As Page Set pagNew =...
  20. W

    Copying and Pasting Multiple Combo Boxes

    Hello! I was wondering if someone could help me with the following (please keep in mind that I'm a bit new to VBA): I have a spreadsheet where I want to create one combobox per cell so the user can type in a keyword selection, pick from the drop down, which will return results and auto populate...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...