public

  1. G

    Macro Jump to other Public Functions which are not called

    Hello Experts Here is the situation. I have an excel file which already have bunch of macros including some Public Functions which are real Pain. I am using this excel to build a tool which gives output in an automated way. To do so, I added few worksheets to get user inputs and calculation...
  2. N

    With CommandButton would like to automatically minimize the Userform.

    Hi This is my first time working on API for Minimizing, Maximizing Buttons on Userform and Found the below following code at https://stackoverflow.com/questions/50853247/excel-vba-userform-minimise-button Would it be possible for a command button Click to automatically minimize the userform...
  3. S

    How to store PUBLIC variable values for later use in different subroutines?

    According to J. Walkenbach: That's exactly what happens when I check the value of any public and static variables in the Watch window. Public slxRibbon As IRibbonUIPublic Declare Function InternetGetConnectedStateEx Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal lpszConnectionName As...
  4. S

    Macro to hide passwords as you type them - switching to 32 and 64 bit mode instead of just 32 bit

    Several years ago this forum assisted me with the following code which will type an asterisk in place of the letter typed in order to hide your password from sight as you type it on screen It works fine as long as Excel is running in 32 bit mode. Some users who open up my workbooks are in 64...
  5. R

    Open File Dialog box - VBA

    I'm losing my mind and need some help. I might just be missing something having stared at my screen for way too long today. I have some code that puts a formula in a cell which references a closed workbook, spits out the result, and then pastes it as a value. What I can't figure it is: 1) Why...
  6. U

    Slicer Data Extraction, Public Function

    Hi Guys, Re Slicer Data Extraction I use the below Public Function, followed by the formula "=GetSelectedSlicerItems([@Description])". This works exactly as required, however every time I run other Macros, it loops through the Public Function constantly, slowing the Macro down. A; Is there an...
  7. D

    Calculating dates for subsequent years

    I have a table that is used for a sheet for generating quotes and every line of the quote table has a cell or column where the date is entered (This cell is A17 or column A). Then there is a cell next to it that calculates if the date is a weekday, weekend or public holiday (This cell is B17)...
  8. D

    Text box userform question

    Hi, I've encountered something, i have a userform with a text box and on every computer on my network it allows for Currency variable to take on the value placed into a text box. Public recSaleCheck As Currency Public machineCheck As Currency 'Puts the value of where the row and column...
  9. F

    Public Variable As String

    It seems that a Public variable declared in one module is available in others as well. But what about assigning the value to the variable in one module to be made available in others. Public InitialPart As String 'Module 1 Sub UserInput() InitialPart = "This is the initial part" End Sub...
  10. J

    Working For months, now broken

    Did I miss an update, something with excel or ...? This code is (all stored in a module, save for the workbook_open): Public Function CnSwS(wb101 As Workbook, ws101 As Worksheet, sws101 As String) 'Check to see if Worksheet variables have been established, and if not, establish them! If...
  11. P

    Excel 2010 Add-in WorkBookOpen Issue

    Hi, In developing a 2010 Add-In I have run into what looks like a chicken/egg problem. I want the addin to check every workbook that Excel opens (whether the user opens Excel first and then uses File Open, or opens the file directly from the desktop or other location) and do something special...
  12. K

    referstorange problem

    I have an addin that has range names that are used in code that is called from another open workbook. Most of the range names refer to a single cell and I successfully use the value of those cells with the following code: the first three variables are public variables declared as strings...
  13. M

    Application-defined or object-defined error

    Dear Gents, I've got errornotice for following code: Cells(ActRow, 41).Value = NewUseVol I already define ActRow and NewUseVol(=0) (with public) Would you please suggest any solution to handle this error? Thanks.
  14. I

    Passing Variables Through A UserForm Using Public Variable Declaration

    Hi all, hopefully a relatively straightforward question. The following code is what I'm testing: Userform code: Private Sub DirectoryButton_Click() ' ' ' Dim fd As FileDialog Dim DataPath As String Set fd = Application.FileDialog(msoFileDialogFilePicker) fd.Title = "Select Your...
  15. L

    Why is dynamic public variable returning blank?

    Title I'm trying to use MyUser and MyDate in many modules but it just returns blank. Public MyUser As String Public MyDate As String Sub GetMyUser() Dim MyUser As String MyUser = Application.WorksheetFunction.Proper(Application.UserName) End Sub Sub GetMyDate() Dim...
  16. A

    VBA: Global Variables Unloading After Userform Close

    Good day, Excel Guru's! Right to the point: After closing a userform and opening a userform from the same project (addin file) referencing global object variables, I get the RTE 91 "Object variable or With block variable not set". I normally don't use global variables, but this project is...
  17. B

    Optimize dynamic creation of labels and their click events.

    So my code allows to create a label dynamically (CreateLabel Sub) and dynamically remove labels (RemoveControls Sub) and the class module allows for the click event to occur for these dynamically created labels. The thing is I am using both collection and arrays to make this happen but I feel as...
  18. H

    Out of Memory....caused by "Save"!?!?

    Hi all, I have an unusual VBA Out of Memory Error. I have a spreadsheet which I have restored from backup, which opens fine, behaves fine, and does all it should (it contains about 10 modules, none of which is bigger than 64kb). It contains a couple of very small forms. It also contains about...
  19. D

    Resource Scheduling

    Recently, I had a contract worker help me develop a scheduling spreadsheet. Overall the individual did a very nice job and exactly what I asked of him. Unfortunately, I missed 1 detail that I need to fix / upgrade.... The individual created a schedule for our manufacturing facility...
  20. M

    Load image to Imagebox

    Hi all I am trying to upload a graph into a imagebox in a userform. The code is the second part of a bigger code, thats why all variable are public I can't seem to figure out what the issue is in my code. I am getting a "Object required" error, but as far as i can se from what ever codes i...

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