1. U

    VBA Property - Declare in Sheet or Modules?

    Hello, I've been doing some reading recently and many people are saying the same thing with regards to putting code in a worksheet - "Declare only events in a worksheet, nothing more". The statement in itself isn't that crazy, but it makes me ponder if it's a hard set rule of if there are...
  2. A

    Change Event for Multiple Check Boxes

    I have 25 text boxes named in the following manner on a UserForm Name: id_[X]_box 1<= x <= 25 I am trying to write a program which can register a change event for all 25 boxes and populate the corresponding [DESCRIPTION] Labels. Naming scheme for Description Labels Name: desc_[X]_label 1 <= X...
  3. K

    range error

    I'm new to VBA so be gentle. This just started happening today. Whenever I select a preexisting command button to a macro, I get an error window listing the range as "Wrong number of arguments or invalid property assignment" What can I do now? Sub clearswitchboard()...
  4. I

    Multiple values vlookup? Many to many - Two lists

    Hello, (I did search for a solution on here but couldn't find, hence the new thread) I have the following issue if anybody can help: (Many to many relationships) List 1 <tbody> Ref Property 1 Property 2 0.1 A E 0.2 B A 0.3 C D 0.4 D B </tbody> List 2 <tbody> Properties...
  5. L

    Duplicate rows and fill in new columns based on master list

    Hello all, This is my first time posting and I am hoping you can help me out with this problem in Excel. I have a Final sheet which has locations repeated a fixed n number of times (in this case, n=2) and has its own property columns as shown below: <tbody> Location Property3 Property4 X...
  6. T

    Initialising a class

    This code: <code style="color: rgb(0, 96, 0);">Option Explicit</code> <code style="color: rgb(0, 96, 0);">Private pKey As Long</code> <code style="color: rgb(0, 96, 0);">Private pName As String</code> <code style="color: rgb(0, 96, 0);">Private pChildren As Collection</code> <code...
  7. A

    Populate Range from string

    I'm passing a Range to my Form via a Property Dim Rng as Range Public Property Let rRange(z as Range) Set Rng= z End Property Then I attempt to populate that range (which is a single cell) Private Sub cmdApply_Click() Worksheets("Sheet1").Range(rng).Value = Me.txtTest End Sub I get error 1004...
  8. S

    VBA Error 381 - List Property. Invalid Property Array Index

    Hello, I have the following code but is giving me error 381 when I try to run the macro. For now, I have only one entry in my database in column A and over time more will be added. I need combobox1 to give me the list of entries in column A even if I have only or more than one. Can I please...
  9. P

    runtime error '380 Could not set the rowsource property. Invalid property value

    Private Sub UserForm_Initialize() ComboBox1.Value = "Please Select an employee from the dropdown" ComboBox1.RowSource = "Sheet1!A3:A" & Range("A" & Rows.Count).End(xlUp).Row End Sub Why won't this code populate my combobox? It worked for the person in the YouTube video. Thank You
  10. D

    Issue getting data from Object field called "count"

    Hi, I'm using VBA to call an API (Untappd) and extract a number of datapoints. This is working fine for me for all the fields I want, other than one called "count". When I write what I need to get the data: Producer.response.brewery.rating.count VBA automatically renames it to...
  11. D

    Cells property question Run-time error 1004

    Hi Trying to understand Cells property better. When I use Cells property below for Sheet1 it works, but when I try to then use Cells property against SHEET2 I get Runtime error 1004. It seems that Cells property is tied to Sheet1 somehow. Can someone explain what is happening under the...
  12. N

    Type mismatch riddle using class collection

    Hello The code stops at the highlighted line with Type Mismatch if I use oAttendee (or oGuest in the second block), but not if I use oDelegate: Private Sub Create_Attendees() Dim oDelegate As Delegate Dim oAttendee As Attendee Dim oGuest As Attendee Set oAttendees = New...
  13. S

    HELP - Custom search text on Combo box under protected sheet.

    Dear Excel Experts I need urgent advise on how to do a custom search input text in combo box under protected sheet. The property of combobox is unlock as well as all the cells link to that box are unlock. Below are vb code for this combo box. Private Sub ComboBox1_GotFocus()...
  14. M

    Loop through PT

    I have a PT that is created from a Power Pivot table and I want to loop through each item in the 1 column of the PT. I thought the following would workSet ptField = ptPivotTableList.PivotFields("Proper Name")but I am getting a 1004 error, Unable to get the PivotFields property of the PivotTable...
  15. A

    Data manipulation help... using pivot tables?

    Hi everyone, I have a data manipulation question that seems simple but I can't figure it out! I have a large list of properties which details how (%) the rental cost (Amount) should be allocated/split between various locations (LOC). The data looks like this: <tbody> A B C D E (D*B) F G H...
  16. D

    MatchEntry Property

    Good day all, Please I have a comboBox named "prd" which displays all products listed in sheet1 Column A. Under the comboBox property, I have set the RowSource and also the MatchRequired to True, but the MatchEntry can only be set to MatchEntryComplete or MatchEntryFirstLetter. Please I...
  17. Q

    Lookup product based on multiple criteria in 1 column

    Hi all, I've got a file where I have multiple products and they have certain characteristics. These characteristics also have values. I need to lookup which products only have the characteristic value of "rain" or "rain" AND "fire". If a product does not meet this criteria, the lookup should...
  18. J

    Worksheet Reference using Personal.xlsb

    Hello: I am building a macro that works with multiple other files. It is contained in the personal.xlsb file. However, when I refer to the worksheets in the other files, I'm able to use the Name property -- for example "New Sheet" -- without a problem. But when I try to use the CodeName property...
  19. S

    Change Userform Combobox Value from Combobox Column after additem has occurred

    I have ComboBox1 and CheckBox1 Private Sub UserForm_Initialize() With Me.ComboBox1 .Clear .ColumnCount = 3 .ColumnWidths = "50;0;0" .AddItem "Hi" .AddItem "Bye" .AddItem "See Ya" .Column(1, 0) = 1 .Column(1, 1) = 2 .Column(1, 2) = 3...
  20. T

    Image File Properties

    Excel VBA is great to read a picture's metadata but it seems tough to have it write any to the file. Ffor a large number of pictures, because it's so much easier to modify the image attributes in Excel than to do it to the pictures individually, I'm looking for a way to take what I write on a...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back