Consulting

Results 1 to 3 of 3

Thread: vba property in lcase

  1. #1

    vba property in lcase

    In my case it is the property "Name" which appears in lowercase i.e. "name".I have not declared it as variable but it still shows as so.but it successfully runs code. Please help.Here is the code
    Sub Oh(chtname As String, chtsheet As String, chtrange As String, chttitle As String, chtaxistitlecategory As String, chtaxistitlevalue As String)
    
    
    On Error GoTo ErrorHandling
    
    
    With Charts(chtname)
        .ChartType = xlColumnClustered
        .HasTitle = True
        .ChartTitle.Text = chttitle
    
    
        .SetSourceData Source:=Sheets(chtsheet).Range(chtrange), PlotBy:=xlRows
        .Axes(xlCategory, xlPrimary).HasTitle = True
        .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = chtaxistitlecategory
        .Axes(xlValue, xlPrimary).HasTitle = True
        .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = chtaxistitlevalue
    End With
    Exit Sub
    
    
    ErrorHandling:
    
    
    MsgBox "No charts found create one ?"
    Charts.Add
    ActiveChart.name = chtname
    Resume
    End Sub
    
    
    
    
    Sub callOh()
    Call Oh("MyChart", "ChSheet", "A1:D9", "ExCh", "Month", "Sales")
    End Sub

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    You must have used lower case name at some point. If it really bothers you, just type:

    Dim Name
    somewhere, then delete it.
    Be as you wish to seem

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    I've noticed that the 'all in lower case' happens sometimes, but I've never been able to track down why or have a consistent test case

    Let us know if Aflatoon's suggestion works
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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