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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:44:55+00:00 2026-06-04T10:44:55+00:00

I have recorded this macro. It’s for inserting a chart. How can I create

  • 0

I have recorded this macro. It’s for inserting a chart. How can I create a chart shape and a sign it to a variable for later reference? I want to pass a variable to the range. I just want to change the (52) number. So if the variable is row how can I use it in the following code. I tried this

("'Simpson'!$K$3:$L$row") 

But it doesn’t work

ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("'Simpson'!$K$3:$L$52")
ActiveChart.ChartType = xlXYScatterSmooth
ActiveChart.ChartTitle.Select
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.ChartTitle.Text = "integrated function chart"
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.SetElement (msoElementPrimaryValueAxisTitleHorizontal)
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.SetElement (msoElementPrimaryCategoryAxisTitleAdjacentToAxis)
ActiveSheet.ChartObjects("Chart 5").Activate
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "x values"
ActiveSheet.ChartObjects("Chart 5""""").Activate
'How can I delete the legend in one. combining the next two
ActiveChart.Legend.Select
Selection.Delete
  • 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-04T10:44:57+00:00Added an answer on June 4, 2026 at 10:44 am

    I tried this and it (“‘Simpson’!$K$3:$L$row”) doesnt work

    Try this

    Dim LRow as Long
    
    LRow = 52 '<~~ Change this as required.
    
    ActiveChart.SetSourceData Source:=Range("'Simpson'!$K$3:$L$" & LRow)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have app in which i have recorded sound files i want that i
I want to check my database for records that I already have recorded before
Suppose that I have recorded a long macro with many commands and special characters.
I have a file with a bunch of lines. I have recorded a macro
I have this recorded in SQL Server: 1- startTime (datetime): 5/2/2009 08:30 (brazilian time
I have recorded a macro with me selecting a project and removing it from
I have recorded audio to a CaptureBuffer, but I can't figure out how to
I have a view like this: CREATE VIEW MyView AS SELECT Column FROM Table
i have two function recordsound and post this recorded sound to the server. this
I recorded a macro to create graphs on a worksheet. The data are organized

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.