+ Reply to Thread
Results 1 to 4 of 4

Dim Line Labels?

  1. #1
    Registered User
    Join Date
    06-30-2005
    Posts
    61

    Dim Line Labels?

    I am dealing with a macro that makes several graphs. The label for the lines of the graphs depend on the number attached to the name of the file. I do not want to have to go into the VB code and find and replace the numbers for each of them. Is there anyway I can write this at the top and have it go for each of them? I tried this earlier with no sucess, but I will post it to help you better understand what I am talking about. It looked something like this:

    Dim plot300K as Name
    plot300K = "13T300K2per0500"



    ActiveChart.SeriesCollection(1).Name = "=""plot300K"""

  2. #2
    Registered User
    Join Date
    06-29-2005
    Location
    England
    Posts
    50
    Dim plot300K as String
    plot300K = "13T300K2per0500"
    ActiveChart.SeriesCollection(1).Name = plot300K

  3. #3
    Registered User
    Join Date
    06-30-2005
    Posts
    61
    I tried that before switching over to Dim as Name. When I dim it as a string, it simply gives it the name "plot300K."

    Edit: Nevermind. I had forgotten to take the quotation marks out.
    Last edited by Losse; 07-13-2005 at 11:03 AM.

  4. #4
    Registered User
    Join Date
    06-29-2005
    Location
    England
    Posts
    50
    Because you had the string Plot300k in quotes.

    Remove the quotes and it becomes a variable rather than a string constant

+ 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