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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:37:04+00:00 2026-06-13T07:37:04+00:00

If I populate an object in vba with 10 values, and paste it into

  • 0

If I populate an object in vba with 10 values, and paste it into a range that has been defined to be 200 rows long, will these 10 values be copied over and over again in the predefined range?

note: the populating and pasting is done via vba code, and the range is defined in excel.

this seems to be happening in excel vba 2007, but not in 2010. need to fix the 2007 problem. would appreciate your input..

thanks in adv!

  • 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-13T07:37:06+00:00Added an answer on June 13, 2026 at 7:37 am

    To avoid pasting extra data, Set a variable to your named range and Resize that variable before pasting, eg

    If the ‘object’ being pasted is a Range

    Set rng = [MyNamedRange]
    rng.Resize(CopyFormRange.Rows.Count, CopyFormRange.Columns.Count).Copy CopyFormRange
    

    If the ‘object’ being pasted is an Array

    Set rng = [MyNamedRange]
    rng.Resize(UBound(CopyFromArray, 1) - LBound(CopyFromArray, 1), _
               UBound(CopyFromArray, 2) - LBound(CopyFromArray, 2)).Copy CopyFormRange
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know the best way to populate an object that has
I have to populate object with values that are in String format and I
I have an object I'm trying to populate from another object (that is, iterate
I created a webpage where in a select element (Object) will populate based on
I have several methods that populate a SQLCommand objects parameter collection from an object
I have been trying off and on to populate an object from an XML
I am trying to pull values from a datatable object and populate an object
im creating a Factory class that will contruct and return an object. I normally
Using VBA. My script moves a file into a directory. If that filename already
In the pageload i populate a dropdownlist like this: protected void Page_Load(object sender, EventArgs

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.