+ Reply to Thread
Results 1 to 6 of 6

Sending activex objects to subroutine for alterations

  1. #1
    Registered User
    Join Date
    09-12-2018
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    32

    Sending activex objects to subroutine for alterations

    Hello,
    This is brief: if anyone has any information on modifying ActiveX controls dynamically - brief explanation:
    I want a sub that I can send any button, listbox, label etc . . . to - objects that share similar properties like font and color - so I can modify them during program execution.
    I could write the rules for each object but that kinda defeats the point of automation.
    Any help would be cool.
    Happy night,
    Shawn

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,703

    Re: Sending activex objects to subroutine for alterations

    You can call this Sub with a control object like this:

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Sending activex objects to subroutine for alterations

    Quote Originally Posted by 6StringJazzer View Post
    . . .
    Please Login or Register  to view this content.
    Wouldn't you want to ensure that C were an acceptable type, i.e., avoid runtime errors if someone tried calling this with a Worksheet or Application object?

    That is, a few TypeOf C Is . . . checks?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,703

    Re: Sending activex objects to subroutine for alterations

    Quote Originally Posted by hrlngrv View Post
    Wouldn't you want to ensure that C were an acceptable type, i.e., avoid runtime errors if someone tried calling this with a Worksheet or Application object?

    That is, a few TypeOf C Is . . . checks?
    It would be an improvement. Please provide your suggested code.

  5. #5
    Registered User
    Join Date
    09-12-2018
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    32

    Re: Sending activex objects to subroutine for alterations

    Thank you - this is what I wanted. I need to start saving these clips.
    Happy day,
    Shawn

  6. #6
    Registered User
    Join Date
    09-12-2018
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    32

    Re: Sending activex objects to subroutine for alterations

    Thank you,
    I've written the rules based on object typename.
    HappyDay,
    Shawn

+ 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. Excel bugs with activeX objects
    By gbeats101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2016, 09:28 AM
  2. ActiveX objects stop working
    By fenfool in forum Excel General
    Replies: 3
    Last Post: 12-03-2015, 01:49 PM
  3. Can I protect activex-objects?
    By Crüe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2011, 01:09 AM
  4. Sending emails with objects
    By ya7omar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2010, 10:31 AM
  5. reference to MS ActiveX Data Objects 2.8 Lib
    By MCCCLXXXV in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2009, 02:18 PM
  6. all objects and userforms opened in a subroutine closed upon exit by default?
    By stanigator in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2007, 09:58 PM
  7. [SOLVED] Worksheet ActiveX Objects
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2005, 01:05 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