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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:00:35+00:00 2026-05-15T18:00:35+00:00

So I am creating an excel report from an access database. So this is

  • 0

So I am creating an excel report from an access database. So this is done in access VBA.

Here is my code:

Public Sub ExportActiveSheet()

   'irrelevant data


   'get the info
   ExcelSheet.Range("A3").CopyFromRecordset rs




   Set rs = Nothing
End Sub

so now, as you can see.. my recordset gets copied to a range starting from A3. I have an unknown number of columns (right now, user can select between 1 column to 36 columns, but this can grow. Again this should be irrelevant).

I want to select everything from A3 till the end of the worksheet (or, even better only the rows where there is data) and change the row height.

I have tried:

    ExcelSheet.Range(Cells(3, 1), Cells(10000, 40)).Select
    With ExcelApp.Selection
        .RowHeight = 22.5
    End With

but it gives me a Method Range of object _worksheet failed error

  • 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-15T18:00:36+00:00Added an answer on May 15, 2026 at 6:00 pm

    You could always try:

    ActiveSheet.Range("A3:A" & ActiveSheet.UsedRange.Rows.Count).Select
    
    With Selection
         .RowHeight = 20
    End With
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating excel file using below code public class ResultSetToExcel { private HSSFWorkbook
I am creating an excel report from vb.net. Now it works. But i realize
i have this code to read Excel file Dim scheduleFileName As String 'Creating Excel
I am creating an Excel file dynamically(data coming from database). on calling the URL
I am creating an excel report in vb.net using the office interop. When the
I am creating an Excel Worksheet from C# using Microsoft.Office.Interop.Excel, and I have not
I am creating a report in my ASP.NET application. The report outputs to Excel
An iPhone app which I am creating generates reports from a Core Data database
I'm creating HTML (popup window), EXCEL and PDF report and would like to show
I have a C# application where I am creating numerous Excel Files from Data

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.