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 8711371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:51:38+00:00 2026-06-13T04:51:38+00:00

Hello I have written a code for generating the graph and it is working

  • 0

Hello I have written a code for generating the graph and it is working correctly.
The problem is it is taking lot of time to generate. and i am not getting why it is taking time.
the code is

    Dim cc As Chart

    Set cc = ActiveWorkbook.Charts.Add
    Set cc = cc.Location(Where:=xlLocationAsObject, name:=assume)

    With cc

     .ChartType = xlXYScatterLines

     With .Parent

       .Top = Columns(b).Offset(0, 4).Top
       .Left = Columns(b).Offset(0, 4).Left
       .name = "cc"

     End With

  End With

  Dim sc As Series
  Set sc = cc.SeriesCollection(1)

  With sc
      .Values = Columns(b).Offset(0, -3)
      .XValues = Columns(b).Offset(0, -5)
  End With

Please somebody help me

  • 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-13T04:51:40+00:00Added an answer on June 13, 2026 at 4:51 am

    Try this, to just chart the rows of the column with actual data.

    Sub makeChart(b As String, assume As String) 'i presupposed these arguments based on your code
    
    Application.ScreenUpdating = False
    
    Dim cc As Chart
    
    Set cc = ActiveWorkbook.Charts.Add
    Set cc = cc.Location(Where:=xlLocationAsObject, Name:=assume)
    
    With cc
    
        .ChartType = xlXYScatterLines
    
        With .Parent
    
            .Top = Columns(b).Offset(0, 4).Top
            .Left = Columns(b).Offset(0, 4).Left
            .Name = "cc"
    
        End With
    
    End With
    
    
    Dim strValue As String, strXValue As String
    
    'here you are using the passed column letter to find the specific column you want to chart
    strValue = Split(Range(b & "1").Offset(, -3).Address, "$")(1) 'will return "C" if given column F
    strXValue = Split(Range(b & "1").Offset(, -5).Address, "$")(1) 'will return "A" if given column F
    
    Dim sc As Series
    Set sc = cc.SeriesCollection(1)
    
    With sc
    
        'will select from row 1 to the last true used row in the given column
        .Values = Range(strValue & "1:" & strValue & Range(strValue & Rows.Count).End(xlUp).Row)
        .XValues = Range(strXValue & "1:" & strXValue & Range(strXValue & Rows.Count).End(xlUp).Row)
    
    End With
    
    Application.ScreenUpdating = True
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have written code for generating graph using vba. everything working correctly ,but
Hello there i have written some code in jquery to add new input type
Hello I have written the following code. My objective was to write a function
I have written code to swap strings, but I am not able to swap.
Hello guys I have this weird problem with Razor Syntax. I have written the
i have written the following code to copy a string hello world to another
hello every one I have written code char sentence[100]; scanf(%s ,sentence); char * ptrs
hello i have written these piece of code, when i run PUBLISH it shows
Hello I have written a code for setting the range property , and it
I have written a small piece of code: System out = null; out.out.println(Hello); This

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.