Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8615725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:27:00+00:00 2026-06-12T05:27:00+00:00

I’m trying to create a chart from 5 ActiveX Textboxes which I put in

  • 0

I’m trying to create a chart from 5 ActiveX Textboxes which I put in my Worksheet. First the user types in the values and then presses a button which generates the chart.

This is my approach but it doesn’t work. It says something like “Object necessary”

Private Sub CommandButton1_Click()

Dim arKurse(4) As Double

arKurse(0) = Conver.ToDouble(TextBox1.Text)
arKurse(1) = Conver.ToDouble(TextBox2.Text)
arKurse(2) = Conver.ToDouble(TextBox3.Text)
arKurse(3) = Conver.ToDouble(TextBox4.Text)
arKurse(4) = Conver.ToDouble(TextBox5.Text)


Dim oChtObj As ChartObject
Set oChtObj = ActiveSheet.ChartObjects.Add(Left:=445, Width:=385, Top:=10, Height:=245)

With oChtObj.Chart
    .SeriesCollection.NewSeries
    .SeriesCollection.Values = arKurse
    .SeriesCollection.XValues = Array("1", "2", "3", "4", "5")

    .ChartType = xlLine
    .HasLegend = False
    .HasTitle = True
    .ChartTitle.Caption = "Chart"

End With

End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:27:01+00:00Added an answer on June 12, 2026 at 5:27 am

    There are a few things that don’t work

    1. Conver.ToDouble should be CDbl unless you have a good reason to use a custom method?
    2. TextBox.Text should be Textbox.value on a userform and also best to qualify the location of the textbox with it’s parent. (in this case Userform1 but could be Sheet1 if textbox is on worksheet)
    3. Need to define which seriescollection

    The below is updated to work hopefully

    Option Explicit
    
    Sub SetupUserformToTest()
    UserForm1.Show
    UserForm1.TextBox1.Value = 1
    UserForm1.TextBox2.Value = 2
    UserForm1.TextBox3.Value = 3
    UserForm1.TextBox4.Value = 4
    UserForm1.TextBox5.Value = 1
    CommandButton1_Click
    End Sub
    
    Private Sub CommandButton1_Click()
    
    Dim arKurse(4) As Double
    
    arKurse(0) = CDbl(UserForm1.TextBox1.Value)
    arKurse(1) = CDbl(UserForm1.TextBox2.Value)
    arKurse(2) = CDbl(UserForm1.TextBox3.Value)
    arKurse(3) = CDbl(UserForm1.TextBox4.Value)
    arKurse(4) = CDbl(UserForm1.TextBox5.Value)
    
    Dim oChtObj As ChartObject
    Set oChtObj = ActiveSheet.ChartObjects.Add(Left:=445, Width:=385, Top:=10, Height:=245)
    
    With oChtObj.Chart
        .SeriesCollection.NewSeries
        'Assumed series 1
        .SeriesCollection(1).Values = arKurse
        .SeriesCollection(1).XValues = Array("1", "2", "3", "4", "5")
    
        .ChartType = xlLine
        .HasLegend = False
        .HasTitle = True
        .ChartTitle.Caption = "Chart"
    End With
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to select an H1 element which is the second-child in its group
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.