1. M

    Application.CutCopyMode=False on inactive sheet

    Hi All, Newbie to VBA and I'm struggling to resolve an issue. I'm running a module with a button on sheet 1 it copies data to sheet 2 & 3 when it gets to the last copies (Bold) the range remains highlighted on the sheets 2 & 3. I've tried using Application.CutCopyMode = False which only seem...
  2. L

    VBA variable Userform to Module

    Hi All, I have looked at so many different examples, but I'm not able to relate it back to my code. Here's what I have... I was using an input box, but if the user spells something incorrectly, it could pose an issue... so I decided to use a form with radio buttons. Please provide any...
  3. M

    Size limit on Modules in VBA?

    I'm nearing the completion of a macro-enabled workbook that has many modules. I remember seeing some forum posts online that talked about there being a size limit to modules. It seems that the unofficial word is that the limit is 64K for each one. One post I saw suggested to type the...
  4. B

    What are Class Modules

    Hi, I am new to MS Access and have never used Class module in Excel VBA either. My question is more regarding Access, can anyone please help me understand what are class modules. How they are different from regular modules. What are the advantages of a class module or why and when should we...
  5. G

    Run-time error 438. Object doesn't support this property or method.

    Hello. I was unable to find any leads on this by searching. I have a workbook with a sheet containing several combo boxes. The combo boxes are populated by code in the This Workbook module when the file opens. Some people can open the workbook without problems. Some other people get a...
  6. S

    Dynamic unique lists

    Hi all I am trying to create a series of dynamic lists with data from a table searching on 1 criteria to return a second set of data Example data set Make Item 200mm ICP module 300mm DEP module 200mm DSiv module 200mm DEP module 300mm Synapse module 200mm DEP...
  7. H

    VBA code for undo

    Hi, I am looking for a vba code for my module which will undo my works. thank you
  8. L

    new module for recording macros

    Hi I inserted a module and wrote a macro there. Then went to excel and recorded a macro. I went back to VB editor and found that excel inserted a new module and put recorded macros in that module and my first module was not touch. Now when I record any macro, the new recorded macro will go to...
  9. A

    Error 91: Object variable or With block variable not set

    I keep getting the aforementioned error. I have a module (modGlobals) which I use for all public variables... Below seems to be the offending Sub which is in a module. This code is used to populate a list box from entries on a spreadsheet. Sub GetList() If Right(frmMain.Caption, 3) = "V&V"...
  10. D

    For each cntl trigger class module

    Hi I've dynamically created a number of textboxes on a userform. Each textbox was added to a class module with some associated attributes. I also have a number of option buttons to the side of the userform. By clicking the textbox, i can update the text in the textbox from the asociated...
  11. mikecox39

    UDF question: from Chapter 4 VBA and Macros text.

    I'm studying Jelen's book "VBA and Macros" and at the start of Chapter 4, on UDF's, he directs the reader to open a new module in the the VBA Editor and type the following function into the module: Add (Number1,Number2). Can someone tell me what I'm doing wrong because when I enter that line I...
  12. B

    Select a sheet by double-clicking

    Hello, I have a huge workbook with several tabs. I would like to be able to select the tab called "Main" by simply double-clicking anywhere in the spreadsheet. I tried with the code below (ThisWorkbook module) but it does not work :cool: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As...
  13. H

    Module Usage

    Hi - I have a general questions about whether it's best to put all your code into 1 macro, or create separate modules for each procedure and then call them? thanks!
  14. J

    find and replace text within a known module

    Hey all!! I have a form that opens when I open a workbook. I use the form to open another workbook via a drop down list. I use Select Case to open the chosen option. What I'm looking to do is change wording in a module in the first opened workbook. How would I use the Find..Replace method and...
  15. A

    Public Variables -Can They be Referred to by Subs in Multiple Modules?

    I had hoped to be able to declare a variable as public in one module, assign a value to it then refer to it in other modules but as soon as I try to use it in a different module I'm getting "Compile error: Ambiguous name detected" Module 1 Highlights Public Var_DRPS_Code_Version As Variant...
  16. D

    VBA Code to force uppercase text in multiple textboxes

    Hello, I am new to excel an I was hoping to get some help. I have created a userform with multiple text boxes, I would like to force the entered text to Upper case. I currently am using a ucase syntax, but it looks rookie and slows my code down This is what I have so far. Private Sub...
  17. N

    Variable in VBA7

    Hello, I share a lot of generic code between my projects I load a module and it "speaks" immediately with other modules, enum's and type's... sometimes some specific module/enum/type is not on the workbook and I need to comment out a lots of line of code, so I thought to use some kind of...
  18. J

    Excel Book Login and PW question

    Does anyone have any tips on the best way's to protect your workbook with a Login? Maybe an up front Form and Module? Thank you for any help... Johnzea
  19. J

    Pivot table filter reference from cell value

    Hello. I asked a question yesterday in a thread that was from August of 2013: I'd like to ask the same question here in a new post. I used versions of the following code. Code in the Sheet Code...
  20. R

    [VBA] RE GetOpenFileName, I want to point Excel to a file, and then reference that in other modules

    Hi all, Doing a new sheet for reporting, I want to report on a campaign. Let's say our campaign is called "70. London" I use GetOpenFilename to point Excel to this, and then reference that file as 'facml' So now when I talk about facml in that module, it knows the file name and location, so...

Some videos you may like

This Week's Hot Topics