optional

  1. D

    Argument not optional problem If Not Intersect Private Sub Worksheet Change

    I have a woworksheet which gathers data from an external source and is continually updating - similar to stock prices. I am trying to copy a range of data in i8:i40. Have tried numerous ways but without success. Reading various forums the below seems most logical to meet my needs but i'm...
  2. J

    Excel.Workbook how do I list worksheets from "this workbook"

    Hello, I am trying to use =Excel.Workbook() to list all of my sheet names. I see the syntax: Excel.Workbook(**workbook** as binary, optional **useHeaders** as nullable logical, optional **delayTypes** as nullable logical) as table But for **workbook** how do I say "this workbook" without...
  3. 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...
  4. J

    Count Uniqe With Criteria UDF (Addin Question)

    Good Morning/Afternoon! I created a user Defined Function that works amazing whenit is in the active workbooks module. However, when I tried to turn it into an add-init gives me a #Value Error. I know why it is doing this, I just can’t figureout how to solve it. I need a way to use the UDF...
  5. N

    Argument Not Optional Syntax Error for ="=SUMIF(___

    Getting Argument Not Optional Error Marked in Red Dim ws As Worksheet Set ws = Worksheets("Sheet1") ws.Activate Mnth = Me.ComboBox1.Column(1, Me.ComboBox1.ListIndex) For i = 1 To Day(DateSerial(Year(Date), Mnth + 1, 1) - 1) ws.Cells(i, 1).Value =...
  6. D

    Running macro with optional parameters

    Hello - I have a macro with the following signature: Sub Create_Table (Optional ByVal WCP_Special As Boolean = True). While this macro is typically called from another macro most of the time, there are some occasions when I want to call it as a standalone. However, I am unable to do that...
  7. M

    Optional arguments in function

    Hi, I have a function with optional inputs. The thing is I need some way of knowing was an input entered or not. How do I do this? Function Read(i1 As Integer, Optional i2 As Integer, Optional i3 As Integer, Optional i4 As Integer) How do I tell if "i4" was entered or not? Thanks
  8. J

    VBA UDF: Count Unique Values with Optional Multiple Criteria

    Hello, I'm coming here for help on a UDF to count unique values with (optional) multiple criteria. I've pieced together the following code but am having trouble getting it to work (it throws a #VALUE error each time). Is there a way to get this code to work? Function...
  9. D

    CUBEMEMBER Solution Needed - showing a result that's not in the data

    I'm working on a CUBEMEMBER string and it always returns me the last value regardless of whether that value is in the table or not. here's the actual text. =CUBEMEMBER("ThisWorkbookDataModel",{"[Program Entry].[PROGRAM KEY].&[PROGRAM KEY DESCRIPTION]","[Program Entry].[PLANNER...
  10. Z

    Debug ? .Caption = strCap

    Hi I have this in my module and I must of done something earlier that I don't know of and when I open an excel sheet I get a break. Its breaks at .Caption = strCap and I don't know why also it says commandBarbutton failed Does anyone know why this is happening thanks Function...
  11. T

    Can I create a dropdown list using some kind of index match?

    Hi Everyone, I'm putting together an invoice that will select a product in Cell J8, (this is simply done with a dropdown box and is all set up!) Now K8 is the optional extras and this is where I need help The optional extras are all different depending on what product is chosen In sheet...
  12. A

    compile error: argument not optional

    Hi guys, i may need some help here. I'm new to VBA excel and want to save the data directly into MYSQL database. But i have encounter some compile error with argument not optional. Here's my below codes: Sub dbConnect() <--- error from here Dim conn As New ADODB.Connection Dim iRow As...
  13. A

    Optional not working in Excel 2007

    Sub DoComment(r As Range, T, Optional Append = False, Optional theSize = 10) After much debugging, I find theSize above is NOT 10 !!! Just confirmed by stepping. It works correctly in Excel 2003. Can I fix it ? Thanks
  14. P

    Clearing Immediate Window

    Hi Any guidance on why Line 1 (Application.) works when used in isolation but not in my test sub. Objective - Clear the Immediate window each time i run test during development? Cheers Paul Sub Test() Application.SendKeys "^g ^a {DEL}" Dim fDialog As FileDialog, result As...
  15. M

    Creating a user defined Formula with multiple optional entries

    Hello, I need to develop an UDF for checking a cell value against several possible entries to check if the cell is equal to any of those values or not. I know how to do the check (I am thinking to assign the entries to a scripting dictionary and do a dic.exists function). But writing the...
  16. C

    Passing optional arguments with named parameters from the spreadsheeet to a custom function (UDF)

    This is not about passing optional arguments within VBA. This is about passing optional arguments from the spreadsheet to a custom function written in VBA. I've been surprised to find not a single mention of passing optional arguments, especially named parameters, from the spreadsheet. Here's...
  17. X

    Optional Arguments in Properties of a Class

    I have a class for a cylinder and i want the user to have the option not only to read the volume of the cylinder but to write the volume and preserve the height, radius or proportion by user's choice. I'm with this code for that condition: Public Enum PreserveRelationType PreserveRadius = 0...
  18. H

    Duplicate Data Identification in givin Excel Colums

    Hi All, Can anyone will help me out with stated requirement. I need a macro code where if I enter same data (text or number) in any given column then I should get the error message or pop-up message. It also should be optional message not mandatory and excel need to allow to user enter same...
  19. J

    Help!!

    I have some questions for my midterm that is tomorrow Please Help!! Thank you! 1) Where are optional arguments always placed? 2) What are function arguments always separated by? 3)What is an example of a comparison operator? 4) what is a data marker? 5) How do you move an embedded chart to a...
  20. S

    How to make a field 'optional' in a data entry sheet?

    I have a data entry sheet which takes the input values from one sheet and dumps them onto another sheet using the following macro: Sub UpdateLogWorksheet() Dim historyWks As Worksheet Dim inputWks As Worksheet Dim nextRow As Long Dim oCol As Long Dim myRng As Range...

Some videos you may like

This Week's Hot Topics

Top