optional

  1. T

    Optional Rows in calculation

    Hi there. This seems really simple, but honestly not sure how to accomplish. I'm making a simple trip planner in excel, and I have a total row to total expenses. I'd like to be able make certain trip expenses optional so we can quickly see how skipping/attending certain things affects our total...
  2. VBE313

    How Do you Put Optional Parameters in UDF the Correct Way?

    In the following code, I can not seem to calculate my UDF correctly, am I putting the optional things incorrectly? Function weldMinutes(numOfPIA, simpleOrComplex, antiSplatterYorN, fixtureYorN, numOfTack, weldType1, GMAWorGTAW1, weldLength1, numOfWeldStarts1, Optional weldType2 As Long...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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 =...
  8. 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...
  9. 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
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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