+ Reply to Thread
Results 1 to 2 of 2

How to write a Function with control name as an argument

  1. #1
    Forum Contributor
    Join Date
    08-20-2019
    Location
    Mumbai
    MS-Off Ver
    Office 365
    Posts
    101

    How to write a Function with control name as an argument

    I use some subroutines regularly for ListBoxes like: Moving items up or down within listbox, Deleting an item, Adding an item etc.

    How to I write a function where I pass the name of the ListBox as an argument. Pls consider the below code. In this how do I change referring to ListBox when using as a Function.

    Please Login or Register  to view this content.
    Last edited by hemantparmar; 05-06-2020 at 02:44 PM.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: How to write a Function with control name as an argument

    Why not pass the actual control rather than its name?
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to write NOT EQUAL TO argument
    By makinmomb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-18-2015, 12:24 PM
  2. Replies: 7
    Last Post: 01-07-2015, 06:29 AM
  3. [SOLVED] ByRef argument type mismatch / Passing array as a function argument
    By pzling in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-29-2012, 06:23 PM
  4. Replies: 0
    Last Post: 04-02-2012, 04:28 PM
  5. pass control as argument
    By horbay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2011, 09:04 AM
  6. [SOLVED] Function (array argument, range argument, string argument) vba
    By Witek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2005, 11:07 AM
  7. [SOLVED] How can I write a formula or an argument to highlight a date when.
    By saffield in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-24-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1