routine

  1. M

    VBA - How do I stop a Routine if the user cancels one of the Userforms

    I have a Sub Routine to help users add a new tab to a spreadsheet. It starts by opening a userform where they enter the name of the new tab. The userform then closes and the VBA then searches to see if there is already a tab with that name - if there is the user gets a message to say it already...
  2. E

    Title a Sub Routine with a variable.

    I have over a dozen checkboxes. They are titled checkbox1, checkbox2, checkbox3... etc. They each have a sub routine that tells them what to do when click. These subroutines are identical except for the number that indexes each checkbox. While this was easy to create using copy/paste. It is...
  3. D

    passing sheet address to subroutine

    what is a correct way to access a open workbook.sheet that is currently open when linking to a subroutine or a function? ie.. i open two workbooks in the main routine and the based on a condition in the main routine i link to a subroutine. I can't figure out how to read a value on the open...
  4. T

    Routine To Add Autosums in 3 different cells based on the value in another cell

    Hi all, I am trying to add numerous autosum's to the worksheet I am working on using VBA and to say I am struggling is an understatement. Below is a link to a picture that show what I am trying to do. https://photos.app.goo.gl/kt4kp8uULuM4hWvFA I need a routine to check the whole worksheet...
  5. E

    Drop Down with Description

    I am trying to understand how I can create a drop down list that also includes a brief description. For example: Value = 1200 Description = Project Coordination I only need the value but need a description so people know what the value 1200 stands for. Is this something a VBA routine needs...
  6. S

    Stop routine when blank is found

    I have completed my first project with VBA and grateful for the help for those members who responded. It has been a of great help in my learning journey. The one annoying thing on one of the routines is that the routine continues and includes '0.00' in cells that should be left empty when the...
  7. Jaafar Tribak

    Cool Customized standard InputBox to allow validating input as you type in.

    Hi all, Workbook Demo. As the tilte says, this is just a standard vba inputbox that I have customized with the use of the Windows API in order to validate user input dynamically as you type-in as well as masking the input with a password character (*) if required. Another cool functionality I...
  8. J

    How To Use Variables Across Multiple Sub Routines (VBA)

    I was wondering if there was anyway to carry variables across multiple sub routines. What I want to do is set a macro to a button, and I want to use an integer to make small changes to the main sub routine. I know I can accomplish this by making the button change a cell in excel, then making...
  9. B

    Calling a UserForm from a code generated button on a worksheet

    I am creating a command button on a worksheet after the worksheet is completely populated. The button is supposed to call a UserForm but I keep getting errors. All of the code for this activity is located in Module 1. I tried creating the button two different ways in hopes that this would...
  10. O

    RibbonX Control Label

    Hello Fellows, I have created a RibbonX dynamic buttons. The progran reads a list in Excel column to create the buttons for the control. The entries in the Excel column are used as labels for the dynamic buttons. A common Callback routine is used for each button. That is, the butt******* for...
  11. D

    Publishing a VBA add-in

    I apologize for not knowing the right words to use here (and if i knew the words i could look up the answer :-)) I have written a piece of VBA code that does what i need it to and have installed it in the spreadsheet that i was testing it on. So far so good. I now want to give the code to...
  12. L

    vba combime all sheets in a workbook

    I thought this vba routine combined all sheets in workbook into a sheet labeled combined It also included a column with name of sheet so I can pivot which is very helpful but I have a workbook of over 128 sheets and the routine does not seem to catch all of the sheets anyone see what the issue...
  13. S

    Calling a sub routine from a startup Sub

    I have created a Sub routine in the 'Workbook Open' section of the 'ThisWorkbook' object to open a custom dialog box when the Worksheet is open ("Do you want to generate a report?"). If the user selects yes the sub goes on to contain all the code needed to generate the report (still within this...
  14. M

    VBA Assign ActiveWorkBook.name to Global / Public Variable to use in other Subs

    Hi, I'm struggling to find the answer.. probably because the way I'm wording the search. I have a Main Sub Routine which in turn Calls various smaller Sub Routines. in the 1st Sub I assign a name to the active 'main' workbook eg. Dim workbooknamemain As String workbooknamemain =...
  15. S

    selective form refresh

    Hi There, I am struggling with a form action. In principlal I have a simple form with four combo boxes. The contents of these are populated when the form is initialised, by routines in code, and the default value is defined. (they are all dates or derivatives) I then want the routine to go off...
  16. W

    Calling a function inside a sub routine

    Hello friends, After several searches on google, it looks that MrExcel is the best place to get VBA Excel help. I am trying to login to different websites automatically. The goal is create a function that will handle all repetitive tasks inside the sub routine, so the code for each different...
  17. R

    How to carry a variable's value to another routine?

    How do I carry a variable forward so that its value can be used in another sub routine? I have several routines that are identical except for the column they're affecting. Just before each routine comes to an end, I assign a value to a variable (the same variable exists in all routines) and I...
  18. W

    Changing folder names from a name based on one column to another

    I am work events where photographers are sorting their pictures into folders based on the Routine number while at the event. But each routine also has a unique ID number that is never repeated that is actually used internally back at the office. So I was wondering if I had an excel sheet that...
  19. I

    Saving/Calling a Module

    Normally, If I create a macro/sub and click the macros button on the developer ribbon I see a list of available macros that are formated as one word. For example, I have macros named: Refresh, GetStats, PositionFill etc.. I can easily assign a shortcut ket to these or call them in a sub...
  20. J

    Stop vbscript

    Is there a simple IF string that can be put into a vbscript/macro, to stop the routine when it encounters a specific variable? I am looking to stop the routine when it encounters a ="" variable in column A on my workbook

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