function call

  1. Phil Payne

    Run a function when a specific worksheet is opened.

    Hello all, its been a while. I have a function that counts the number of conditionally formatted cells in a row. When there's been little or no activity on the worksheet the cells holding the count results can be blank or show an error message when next you open the worksheet. I can double...
  2. D

    Function Call

    Many thanks in advance Using a function to check a column "E" to the last row if the date format is "DD/MM/YYYY" then it needs to copy the data to the next column "F" Says DateFormatCheck "Argument not optional" when I try to add function to the command button Command button code below...
  3. T

    Basic Optimising with VBA Functions

    Hello All, I know it can be done but I'm struggling to work out the correct way to do this.... I have 2 input cells: [Cut Length] and [Total Qty] and there are 6 standard lengths the Cut Length can be cut from. 9, 10.5, 12, 13.5, 15, and 16.5. I need either 1 return cell that shows both the...
  4. A

    Help with GETPIVOTDATA and Dynamic Dashboard

    Hi All, I need some help with the GETPIVOTDATA function and setting up an interactive dashboard. I have a PivotTable that shows the grade percentage for each student in a certain class. On my dashboard, I want to split the students up by class. Unfortunately, I do not know how I should...
  5. dmqueen

    Syntax error on function calls

    Please help! I cannot get past these compiler errors on my function calls, and I can't figure out why. Neither function returns anything, so it should be straightforward. I've marked the function calls receiving the errors with asterisks in the code comments and added the functions being called...
  6. S

    Function help, invalid outside procedure

    Hi all, Excel 2010 / windows 7 I'm trying to assign a value to the current month via 2 function then return it to a destination. I'm all new to function, so I keep getting the error as Invalide outside procedure. First Function to assign a number to the current month Funtion Nmonths() Dim...
  7. S

    call a module not working

    Thanks in advance.... I have a module called meridium and want it to use two other modules and then have a message box. application.run is not working nor am I having success with making another sub like: '(this is an application.run calling the sub from the original module meant to use the...
  8. F

    Run a Function

    Hi, I have function which is formating headers and works OK. Function Header() ..... End Function In sheet1 I added button. How to do that: - if I click on the button function will run and do formating changes?
  9. J

    Worksheet Change function with VLookup

    I am attempting to write a bit of code so that Vlookup is called when a particular cell in my spreadsheet is populated. Although it seems to be working, it is only pulling in the data in row 1. An example of the code is below. Any help would be greatly appreciated. Justin Private Sub...
  10. R

    Object Required calling function on another form

    I am having issues with this code calling the public function EditEntry on frmRunEntry Private Sub CommandButton1_Click() Dim Response As Long Dim RowNum As Variant 'Get the record ID from the user Response = InputBox("Please enter the ID number") 'Test the user input...
  11. J

    Passing a workbook as an object in VBA ByRef - having a problem

    I am working with multiple workbooks from a master workbook and need to pass a workbook object and worksheet object as ByRef parameters. I am successful in other functions, but am not figuring out how to do it into a function that is generic. I am using Excel 2010, workbooks are made in 2003...
  12. U

    Compile error: ByRef argument type mismatch in function call

    I have had this problem before but never in something so simple. In this case it is looking at the variable DataRowCount that is defined as an Integer in the function and assigned the value of 1 in the subroutine. In the subroutine I get the Compile error and it highlights the variable. Can...
  13. J

    how to pass a range to a function; the starting cell is known, ending unknown

    The function definition looks something likePublic Function xyz(Rng as Range) If all the cells are defined, I can call it with =xyz(C10:C55) Each time xyz is required, the starting cell in the column is known, but the last defined cell in each column may change with new data. Cells before...
  14. C

    Function Procedure Path Issue

    This is a frequent problem for me. When I save a macro-enabled workbook that contains function procedures into a new file name, when the workbook attempts to use the function procedures, it is looking for the function procedures in the old workbook name, not the new one. Borrowing some...
  15. D

    Function help

    I created a Function in a Module. In my UserForm, I call this function to return a value. For example: Function name1(variable1 as string, variable2 as string) as long Dim Count as long ..Count something name1 = Count End function When this function returns from the calling routine...
  16. D

    Compile Error: Argument not optional

    Good Morning, Afternoon, Night I'm back on VBA in Excel and I'm trying to get a change-event to fire off a Function set in Module1 Code for Function: Function CableSizer(Volts, length, Current) ' If Volts is zero then exit. If Val(Volts) = 0 Then Exit Function End If...
  17. E

    Function call

    Does anyone have an idea as to what happens if a function is called in the middle of its calculation? Is there a way to ensure a previous call is completed first then the second call is executed? What happens in case of hundreds of calls at the same time? How to regulate all these calls one...

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