private sub

  1. B

    Worksheet_Change problem

    Hello: Here is my issue... when data is entered into Range("PymtProviders"), I wanted a macro to convert the first two numbers to a number value in an adjacent column Range("PymtOut"). But for some reason, its not working on the Private Sub Worksheet_Change. It does, however, work as a Public...
  2. L

    ActiveX Control Checkbox and VBA

    hi all, i'm facing this issue i have activex control checkbox which is check automatically with private sub if some conditions are met but if there are no conditions I'm not able to manually check checkbox, because private sub keeps looking at the condition and keeps unchecking it. is it...
  3. B

    Private Sub/worksheet change/hide rows

    Hello: The following code was working for me, but, for some reason, it has stopped. Does anybody note any flaws?
  4. S

    use/ reference VBA Worksheet event in module for use in all workbooks

    Hi there, I'm very new to VBA, first of all, so thank in advance for patience. I have this code saved to "ThisWorkbook" on my PERSONAL workbook: Private Sub Workbook_SheetActivate(ByVal Sh As Object) MsgBox "Name of Sheet : " & Sh.Name End Sub it works fine when I'm within the PERSONAL...
  5. J

    VBA Private Sub - How to use DATEVALUE in a VLOOKUP

    I am trying to get a DATEVALUE from another worksheet by using Vlookup. The reason for this is the worksheet I am trying to Vlookup from is not storing the dates as dates and I am unable to simply change the data into a date format as it is 'controlled' by someone else. Currently, the...
  6. J

    Is there a way to stop 1 macro activating another macro

    Is there a way to stop a macro activating a Worksheet_Change sub? I need the macro to not activate the Worksheet_Change sub as it causes the macro to take a long time to run. Any help would be much appreciated! Thanks J
  7. U

    Combine two Private Sub Worksheet_Change - VBA Macro

    Hi everyone! Thanks for reading first of all. I have these two Private Sub Worksheet_Change(ByVal Target As Range) that work fine alone in one sheet, but if I put both together I get errors. I read that they need to be combine into one so there is only one Private Sub Worksheet_Change(ByVal...
  8. J

    How can I automatically update a Pivot Chart to a User Defined graph via a Private Sub?

    I want to update a Pivot Chart to a User Defined format that I have saved. I know that this can be done through a simple line of code using a Private Sub (I used to know how to do this) however I'm just struggling a bit with geeting this to work. On the worksheet where the Pivot Table is...
  9. J

    Assign a Macro to Hyperlink

    I a found a macro that will run when a hyperlink is selected. however, the problem is that if i have more than one hyperlink it will only work on the macro that was there first. Here is my example below: "Private Sub Worksheet_Asset_Value(ByVal Target As Hyperlink) 'Check if the Target Address...
  10. S

    Running Private Sub

    Hi Experts, After checking the forum I found what appears to be perfect for my needs but not able to get this VBA private sub to run (or it's simply not doing anything that I can see). I have taken the code from this post (I'm using Excel 2010), My set-up is as follows, Open new Excel...
  11. Glühbirne

    How can I get back in to macros that I made private in the past so that I can alter their code?

    Hello Everyone, I recently started working in a workbook that I had made quite a few months ago. I had made my macros private because I didn't want users to be able to run them in any way except for through buttons that I had inserted. Now, I want to get back into my macros and work on the...
  12. D

    Having difficulty with this decision tree game...what's wrong?

    Trying to work through decision trees using Excel and VBA... If I execute straight from the code I see a blank macro pop up where I usually will select and click run to perform the macro...but it is empty. Any ideas... Sub BoardValue(best_move As Integer, best_value As Integer, _ p11 As...
  13. S

    When WorkBook Opens, If Then

    A commandbutton copies Daily Lab.xlsm and saves it into a dir, based upon a Date in a certain cell. (used a code from MrExcel forums) It Works great, btw.... Ex: Daily Lab.xlsm has a date in "C6" of 2/23/2010. It saves it into the Daily Lab\2010\FEB dir, as Feb232010.xlsm (creates dir when...
  14. L

    Call Private Sub based on Checked Cells

    I have a macro that copies/pastes information based on checked cells in a first sheet. That portion is called "BUILDER". I initiate that using a private sub which makes checkmarks in the cells. This is the code for that: <IF target.Column>Private Sub Worksheet_SelectionChange(ByVal...
  15. P

    Calling Private Sub from UserForm code

    I have a macro in a workbook with code in the Open event that opens a workbook: daily.xls In the daily.xls file there is a UserForm with code. In the UserForm code there are private subs. (private sub name: Update) How do I have my initial workbook open the daily.xls file and run the private...
  16. A

    Button_Click code to return to Sub

    Can you tell me sample code to redirect/return the macro to the routine after clicking the button in my userform Private Sub AnswerButton_Click() [????] End Sub

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