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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T03:59:57+00:00 2026-06-19T03:59:57+00:00

When I tried to execute the below code, I got the error message as

  • 0

When I tried to execute the below code, I got the error message as “Run-time error ‘424’ Object Required”,

Sub test()
Range("Q" & i).Text = x1.Text
End Sub

Where x1 is calender object.

If I would use the below code as

Range("Q" & i) = x1.Text

My code would store the date as 02-11-2013 instead of 11-02-2013, the problem here is it re-arranges it month and date.

Hope I will have the solution for this.

Thanks in advance

  • 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-19T03:59:59+00:00Added an answer on June 19, 2026 at 3:59 am

    You are getting an error in the first instance since the .Text property of a range is read-only and is used to get the current formatted value from a cell/range.

    I’d use the format function but also set the number format of the cell you’re putting it into to be safe:

    Range("Q" & i).Value = Format(x1.Text, "dd-mm-yyyy")
    Range("Q" & i).NumberFormat = "dd-mm-yyyy;@"
    

    Edit:
    Further to you comment, I’d suggest trying to Format the incoming date with the day and month swapped and then applying the NumberFormat like so:

    Range("Q" & i).Value = Format(x1.Text, "mm-dd-yyyy")
    Range("Q" & i).NumberFormat = "dd-mm-yyyy;@"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to increase the heap size like the below C:\Data\Guru\Code\Got\adminservice\adminservice>java -Xms512m -Xmx512m Usage:
When I run the code below (entire code at the end), this line: res=self.con.execute(
When I run the entire code below, this line: res=self.con.execute( From this function (where
I run the perl code below. $retCode = ClearCase($cmd); Works with no error, but
I keep getting this error when I tried to execute this query, although I
I got the image path inserted in to database by the below code but
I want to translate my text into device language. So I tried below code
I can build and execute the code below successfully : IplImage* img = cvLoadImage(C:\\hello.jpg);
HI I wanna timeout session from client page,i tried below code but not able
I've got code to run a PowerShell cmdlet from a .ps1 file containing a

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.