private

  1. L

    Macro for recalculation of range of cells in active sheet

    Hi guys, I need to recalculate range of cells with RANDBETWEEN formula. I assign the below macro to command button where I substitute the "Range" with the range I need to recalculate only "D5:S19" but it doesn't work. Private Sub CommandButton1_Click() If TypeName(Selection) = "Range" Then...
  2. M

    Modify VBA Code To Allow Copying of Pivot Table To New Workbook

    The following VBA Code is not allowing for user to copy pivot table from existing workbook to new workbook. Is it possible to edit code to allow this while maintaining the original function of the code? Private Sub Workbook_NewSheet(ByVal Sh As Object) Call DrillDownDefault End Sub...
  3. K

    Object Required error with ActiveX Combobox

    Why do codes A & B below give me an Object Required (424) error (A is assigned to a button, B obviously fires on WB open) but C works without any issues?: A: ComboBox1.Value = "" ComboBox2.Value = "" B: Private Sub Workbook_Open() Dim ROWC As Integer ROWC = Worksheets("JOB...
  4. K

    Trying to reduce repeating code

    I have a userform with three textboxes that collect a search term: search1, search 2, search3. The search value runs through a function generating a list which populates listboxes: listbox1, listbox2, listbox3. If an item in the listbox is doubleclicked then it runs an Instr function selecting...
  5. S

    Why Combobox displays its 1st index value of Duplicate items which are repeated and why not for the duplicate item clicked on

    Hello I want to know why Combobox displays its first index value of 1 st item when searched if the items are duplicated repeated. Why cant it display its index value of its respective repeated item clicked on <tbody> Sr. No Name Add 1 Caroline Martin 2007 Excel Road 2 Brian Green 2010 VBA...
  6. K

    How to mandate text box in user form

    Dear I have an user form i want to mandatory text box (No. 3) please help Private Sub TextBox1_Change()[W11] = Me.TextBox1.Value End Sub Private Sub TextBox2_Change() [W12] = Me.TextBox2.Value End Sub Private Sub TextBox3_Change() [W13] = Me.TextBox3.Value End Sub Private Sub...
  7. J

    why it will error when i click my assigned macro to initialize userform ??

    Private Sub UserForm_Initialize() Me.MultiPage7.Value = 0 Me.MultiPage1.Value = 0 Me.MultiPage2.Value = 0 Me.MultiPage3.Value = 0 Me.MultiPage5.Value = 0 Me.MultiPage6.Value = 0 End Sub
  8. C

    64 Bit 2016 Right Click Context Menu (User Form)

    Hello: I am currently using Excel 2016 (64 Bit). I opened a workbook that is a few years old with a user form that used to have a context menu upon right clicking fields. I am no longer able to show the context menu with the below error: "Compile error: The code in this project must be...
  9. N

    Update a combo box

    Hello, I have the following code on my userform "frmPOS" to check if any entered client name if exist or not, if so, get the ID and mobile to txtID and txtMobile If not, pop up msg that this is not exist and if I need to add a new client, if so, show the form "frmNewClient" and add new client...
  10. N

    Passing Text Box value to another Text Box

    Hello, I have an inquiry in a userform, if you may help me I have the following textboxes that calculate some values txtAmount has a calculation which I have the code for it and all the below text boxes as well, unless the "txtPaid" I need "txtPaid" to be the same as the "txtTotal" but to be...
  11. P

    Combine two Private Sub Worksheet_Change

    Hi, I have below two Private Sub Worksheet_Change, how can i merge for two logic 1st VBA Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A3:A5000")) Is Nothing Then Exit Sub Application.EnableEvents = False With Target .Offset(, 2).Value = Date...
  12. N

    Getting Value as 8.5265128291212E-14 instead of getting 0 or zero in Textbox when values changed and calculated

    Hello Though explored quite few threads on this forum and other links. i did not get the right solution I am Getting value as 8.5265128291212E-14 instead of getting 0 or zero in Textbox when values changed and calculated. happens in tbx10 In worksheet the values are changed as per below...
  13. N

    Different VBA scripts into a one VBA code summarize

    Hello everyone, need “a bit of” help :). I've made a worksheet from different VBA codes and that works, wonder :). But it is very slow. Can anyone help me to summarize all different VBA scripts in one VBA code? <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/>...
  14. N

    VBA Excel UserForm Maximize Minimized Size Drag Control

    Hello, I got the following code to maximize, minimize and resize the form, but it didn't work well, every time I ran it, I got a popup msg "Sub or Function not defined" and highlight "GetWindowLong" Note: I have 64bit system, so I added "PtrSafe" to the "Private Declare Function" but keep...
  15. S

    VBA filters with helper row

    So I currently have a userform setup to hide a bunch of columns, and then buttons to reveal sets of columns as I want to look at them. It works fine, here is a snippet of my code for reference: Private Sub UserForm_Initialize() Columns.EntireColumn.Hidden = False Rows.EntireRow.Hidden = False...
  16. H

    help with Label on userform

    Hey i got some Labels on my userform labels read value for cell's and that part works fine and if no value still ok but if cell text is "FALSE" then my Labels show that " and I didn want it to do that.. this i the code i have on my userform https://ibb.co/9ncB5q4 Private Sub...
  17. K

    Multiplying and dividing textboxes

    Hello all, I was wondering if any one can help with this: Private Sub Userform_Activate() TextBox3.Value = Sheets("Template").Range("AW" & Day(TextBox1.Value) + 7).Value End Sub Private Sub CMDADD_Click() Sheets("Template").Range("AW" & Day(TextBox1.Value) + 7) = TextBox2.Value /...
  18. willow1985

    VBA force only date format in a certain cell on a certain sheet

    Hello, I am trying to have a certain cell locked (B2) that only a certain date format can be entered but I keep getting an error with the code. Perhaps you can shed some light on what I am doing wrong? Still very new to this. Thank you Private Sub Worksheet_Change() Call ValidateDate(2)...
  19. K

    Spell Check in userform

    Hi, I have a spell check macro for my password protected sheets. I also have a userform with a few last inputs (in some text boxes) by the user and these are to be sent to the spreadsheet. This will be the last part of the job card for the user to complete before printing the job card (as PDF)...
  20. C

    Excel 2016 VBA ... 1.)Compiler Error: Type Mismatch? and/or 2.) Code Must be Updated For Use On 64-bit Systems?

    Intro: the program below refers to a userform program that pops up with empty fields to be filled 5x left and 5x right then u can 1. save it and it fills an excel tab (e.g.: client database-tab) 2. delete details (deletes userform - user starts filling it again)...

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 MrExcel.com.
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 "mrexcel.com".
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
Back
Top