private subs

  1. D

    Private Subs to run at opening a workbook

    Dear, I need to run automatically three events upon opening the workbook; it seems that when I put them together within the same sub, only one runs and by-passes the others. The first sub I need to run is to enter a user name, it should be enforced, otherwise to close the workbook. At the...
  2. Y

    Adding as Single with .value not adding correctly

    Having trouble googling this querry as the Variable name Single is very common. Basically I have code that looks to see if the value in the cell is non zero, and if it is non zero then I add my variable (obtained elsewhere) to the existing .vale from the cell. But somehow the adding isn't...
  3. G

    Can the same code be run for multiple fields on a userform?

    I have the following code to check if the formatting of the data being entered into the text field: Private Sub txtTime1_AfterUpdate() With txtTime1 If IsDate(.Value) Then .Value = Format(.Value, "HH:MM AM/PM") Else MsgBox "Input time as HH:MM" .Value = ""...
  4. H

    Please help with compressing multiple Private Subs

    Hi All, Thanks for checking out my question. I've been asked to create a button that only appears based on 3 of 4 values available from a dropdown box(K6). The values are "REMOVE", "ADD ON" and "REPLACE EXISTING". Here's what I have so far. I can get it to work for one value like, "REMOVE", but...

Watch MrExcel Video

This Week's Hot Topics

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
Top