+ Reply to Thread
Results 1 to 4 of 4

Creating Dynamic code in Excel Macro

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    Surrey
    MS-Off Ver
    Excel 2003
    Posts
    25

    Creating Dynamic code in Excel Macro

    Hi

    I have an excel 2003 macro with an internal string array ValueX()
    I want to be able to, in effect, put some text into a cell in a worksheet that will be used by the Macro as if it was a formula in the cell.
    For example, I might put a piece of text such as “=LEN(Valuex(7))” into a cell in a worksheet. LEN is only an example. It could be any Excel Function
    I need the VBA macro to access that cell and set a variable to the calculation the length of the string in Valuex(7))
    I assume this could be done by dynamically creating the code in the Macro
    Could anyone tell me how this is achieved
    Thanks in advance for your assistance

    Ian
    Last edited by Perception; 09-26-2011 at 06:36 AM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Creating Dynamic code in Excel Macro

    Please Login or Register  to view this content.
    for example

  3. #3
    Registered User
    Join Date
    09-15-2011
    Location
    Surrey
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Creating Dynamic code in Excel Macro

    Bob

    Thank you

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Creating Dynamic code in Excel Macro

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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