473,408 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Formatting Borders in Excel Spreadsheet

I'm trying to format borders in my exported query but I can't seem to do it.

I'll keep this simple, this is what I'm trying to do.
Set xlsheet = xlworkbook.Sheets(1)
With xlsheet
With .Range("A2:J" & intRowCount)
.Borders(xlEdgeTop).LineStyle = xlContinuous
.ColorIndex = xlAutomatic
End With
End With

It's not working, any idea how to get this going?

Thanks.
Jun 13 '07 #1
1 3596
ADezii
8,834 Expert 8TB
I'm trying to format borders in my exported query but I can't seem to do it.

I'll keep this simple, this is what I'm trying to do.
Set xlsheet = xlworkbook.Sheets(1)
With xlsheet
With .Range("A2:J" & intRowCount)
.Borders(xlEdgeTop).LineStyle = xlContinuous
.ColorIndex = xlAutomatic
End With
End With

It's not working, any idea how to get this going?

Thanks.
Give this the old try:

Expand|Select|Wrap|Line Numbers
  1. xlSheet.Range("A2:J" & intRowCount).Select
  2.  
  3. With Selection.Borders(xlEdgeTop)
  4.   .LineStyle = xlContinuous
  5.   .Weight = xlMedium
  6.   .ColorIndex = xlAutomatic
  7. End With
Jun 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: + DiamondEagle | last post by:
I'm successfully using Response.ContentType = "application/vnd.ms-excel" to generate an Excel spreadsheet from an asp page and a SQL Server database. One of the columns contains data that is a...
0
by: scooterm | last post by:
### Question Can anyone name a text editor or XML editor (prefer open source) that can open a simple table XML file in a spreadsheet-type GUI, without adding any extra formatting or junk to the...
0
by: ImraneA | last post by:
Hi there Many thanks to those people who contributed to this group, helped me greatly. Enclose, my code, hope it helps others :- Public Function Export_Excel_9(tbx1 As Variant, tbx2 As...
0
by: ImraneA | last post by:
Hi there Have a database, where front-end interface allows user to select a ms access database. From there, standard tables are linked. Routine, that creates a spreadsheet, for each table a...
0
by: Giganews | last post by:
I have a TransferSpreadsheet process in my Access 97 database that sends data out to an Excel spreadsheet formatted with a Times New Roman 10 point font, centered text, etc... This always works...
2
by: Damian Arntzen | last post by:
I'm trying to suss out exactly how to assign borders to cells via C# into an Excel 2003 spreadsheet. I've been tinkering some more last night (Aussie time) and managed to figure out a lot more in...
6
by: DeniseY | last post by:
I have an Access report that is created on the fly by the user selecting the fields to be included. The Access report comes out fine, but I want it to automatically output to an Excel spreadsheet....
0
by: jj | last post by:
I'm going mad! I'm exporting a query to excel, and afterwards calculating a field, and a sum of all fields in Excel from a sub procedure in a Module in Access. First I used ...
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.