Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Excel VBA error - Select method of Range class failed

In a workbook with two worksheets, I receve this error message when closing
the file when the second worksheet is active, but not the first.

Debug points to code in a Private Sub relating to one (only) of eight combo
boxes in the first worksheet (which determine the contents of a selection of
cells in the second), as follows:

Private Sub ComboBox3_Change()

Range("A1").Select

This code is in located the worksheet, not the module.

I tried the following code to resolve the issue but no joy:

Sub Workbook_BeforeClose()

Sheets("Cover").Activate
Range("A1").Select

Both worksheets (apart from unlocked cells) and the workbook are protected.

Any ideas?

--
R Ormerod
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
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
Run-time error '1004': Select method of Range class failed pglufkin Excel Programming 3 October 26th 06 03:27 PM
Runtime Error 1004 Select method of Range class Failed IanO Excel Programming 2 June 16th 05 07:40 PM
error 1004 Select method of Range class failed J.E. McGimpsey Excel Programming 1 September 12th 03 07:42 PM


All times are GMT +1. The time now is 02:16 PM.

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"