+ Reply to Thread
Results 1 to 3 of 3

Calling a sub from within a sub

  1. #1
    Registered User
    Join Date
    01-30-2007
    Posts
    1

    Red face Calling a sub from within a sub

    I need to repeatedly set the properties of cells using a for i = 1 to x where I move the cells(row,col).select based upon the value of i . Most of the time the properties set are the same. I would rather call some subroutine or macro from within the for loop than to repeat the same multiple lines of code. Does anyone have a suggestion or snippet of code that can get me started?

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    To call another macro, just use:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    See link for more info. Look under

    Invoking Macros and Functions in another workbook from Code

    http://www.mvps.org/dmcritchie/excel/install.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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