Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2006, 06:38 PM
Authorized User
 
Join Date: Aug 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Horizontal Alignment

So I'm writing this program and I want to output some of the variables to an Excel spreadsheet. Fine, I can do that. So then I want to Set some cell properties to make things look nice. I can set column widths, I can make cell text bold, BUT I CAN'T SET THE HORIZONTAL ALIGNMENT!!! It's driving me nuts!!


Here is a snipit from my code
___________________________________________
Do Until CCLrst.EOF
        If strreg = CCLrst!Reg Then
            With xlCCL.activesheet
                .Cells(currentrow, currentcolumn).Value = strletter
                .Cells(currentrow, currentcolumn).wraptext = True
                .Cells(currentrow, currentcolumn).HorizontalAlignment = xlcenter
------------------------------------------------
the last line give me a "run time error '1004'" Unable to set the HorizontalAlignment property of the Range Class.

This is truley driving me nuts. Anyone have any ideas?
I am running Windows XP and Access 2000






Similar Threads
Thread Thread Starter Forum Replies Last Post
Alignment of ContentPlaceHolder garak0410 ASP.NET 2.0 Basics 2 June 7th, 2006 12:06 PM
Horizontal Alignment Across Columns DuncanM CSS Cascading Style Sheets 1 October 12th, 2005 10:07 AM
alignment p_gauri7 Crystal Reports 0 May 9th, 2005 01:16 PM
Content Alignment Santhi XSLT 3 January 11th, 2005 09:01 AM
Form alignment cpopham Access VBA 3 January 2nd, 2004 07:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.