Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Random error 91

I sometimes get an error 91 with this code, but sometimes it works.

objWkb.Worksheets("Sorted Rankings").Range ("A1:B1")
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = True
End With

Any ideas?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Random error 91

objWkb.Worksheets("Sorted Rankings").Range ("A1:B1") .Select

That is the line. Still having the error 91.

-Brian

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Random error 91

It sounds like you haven't initialized the objWkb variable.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"BerkshireGuy" wrote in message
oups.com...
objWkb.Worksheets("Sorted Rankings").Range ("A1:B1") .Select

That is the line. Still having the error 91.

-Brian



Reply
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
Random #VALUE! error in simple SUM formula results Greg in CO[_2_] Excel Worksheet Functions 2 March 27th 09 07:18 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
How do I find random number in list of random alpha? (Position is. jlahealth-partners Excel Discussion (Misc queries) 0 February 8th 05 05:31 PM
Range object failed - random error Lenny[_2_] Excel Programming 0 August 15th 03 02:10 AM


All times are GMT +1. The time now is 10:49 AM.

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

About Us

"It's about Microsoft Excel"