LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Cannot set HorizontalAlignment Property of the Range Class


Hi All,

I may be having a dumb day here, but....

I am getting the following error:

"Cannot set HorizontalAlignment Property of the Range Class" from this
code:

Sub Test()

With Range("G4")

.Formula = "GP%"
.HorizontalAlignment = xlHAlignCenter
.Font.Bold = True

End With

End Sub


It makes no difference whether I use 'xlHAlignCenter' or -4108 (the
intrinsic value).

G4 is not protected.


Any help is much appreciated.

Thanks,

Alan.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to set the FormulaArrary property of the range class RTK Excel Worksheet Functions 0 April 13th 10 08:38 AM
unable to set the formula array property of the range class JLP Excel Worksheet Functions 3 November 18th 08 10:54 PM
Unable to set the NumberFormat Property of the Range Class - ERROR Jon Delano Excel Programming 3 November 10th 04 07:33 PM
Unable to set the Locked property of the range class Stuart[_5_] Excel Programming 5 June 25th 04 03:32 PM
Unable to set the Locked Property of the Range Class Stuart[_5_] Excel Programming 0 July 15th 03 06:59 PM


All times are GMT +1. The time now is 03:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"