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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:43:58+00:00 2026-05-24T17:43:58+00:00

I need help setting the X and Y axes title inside Excel 2007 VBA.

  • 0

I need help setting the X and Y axes title inside Excel 2007 VBA. It keeps complaining about “Object required”:

Sub macro2()

Dim xAxis As Axis

icount = 1

Charts.Add
Charts(icount).Name = iskewplane & "deg Skew Plane"
Charts(icount).Activate

Set xAxis = Charts(icount).Axes(xlCategory)
With xAxis
    .Axis
    .AxisTitle.Text = "Theta (deg)"
End With

Is there something wrong in my code? I tried recording the macro during setting the axis title name, but the macro is blank during the name setting.

Any help is appreciated

  • 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-05-24T17:43:58+00:00Added an answer on May 24, 2026 at 5:43 pm

    You should use Option Explicit because iCount wasn’t defined and iskewplane wasn’t either.

    Here is the right code:

    Sub mac()
        Dim xAxis As Axis
        Dim iCount As Integer
        iCount = 1
        Charts.Add
         Charts(iCount).Name = "deg Skew Plane"
        Charts(iCount).Activate
    
        Set xAxis = Charts(iCount).Axes(xlCategory)
        With xAxis
            .HasTitle = True
            .AxisTitle.Caption = "Theta (deg)"
        End With
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As the title says, I need some help setting up my ViewModelLocator. It's a
I need help, I followed the following tutorial on setting up my project. http://lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_NetBeans
I know this is not a programming question, and I need help with setting
I need a help with setting a random image using setImageResource method. In the
I need help with jQuery effects, after setting images to a position through style,
now I need help with setting variable. I have two entities Season and Tournament,
I need some help with setting up a cURL request to a page. In
I need help in setting up the development environment for .Net based projects. I
I need some help programatically setting the selected item in a combobox. I've got
I need help setting up my MySQL Database. I would like the database to

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.