Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default RT Error 1004, Select method of worksheet class failed

I am receiving an error: "Run Time Error 1004 Select
method of worksheet class failed" on the following section
of code:

Sheets("Forecasts").Select
Cells.Select
Selection.Sort Key1:=Range("Q2"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Sheets("UpdatePeriod").Select <---- ERROR ON THIS LINE
Period = Range("a6").Value

This macro seemed to work fine until I added a form to the
spreadsheet. Is the form causing issues related to the
class I'm using?

TIA.
Dana
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default RT Error 1004, Select method of worksheet class failed

Its more likely that you renamed the sheet "UpdatePeriod" or are now
spelling it with a space or that sheet doesn't exist.

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Dana Sherbondy" wrote in message
...
I am receiving an error: "Run Time Error 1004 Select
method of worksheet class failed" on the following section
of code:

Sheets("Forecasts").Select
Cells.Select
Selection.Sort Key1:=Range("Q2"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Sheets("UpdatePeriod").Select <---- ERROR ON THIS LINE
Period = Range("a6").Value

This macro seemed to work fine until I added a form to the
spreadsheet. Is the form causing issues related to the
class I'm using?

TIA.
Dana



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default RT Error 1004, Select method of worksheet class failed

It was marked as hidden. I 'unhide' it and it worked.
Thank you so much!
Dana
-----Original Message-----
Its more likely that you renamed the sheet "UpdatePeriod"

or are now
spelling it with a space or that sheet doesn't exist.

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros

for Excel

"Dana Sherbondy"

wrote in message
...
I am receiving an error: "Run Time Error 1004 Select
method of worksheet class failed" on the following

section
of code:

Sheets("Forecasts").Select
Cells.Select
Selection.Sort Key1:=Range("Q2"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Sheets("UpdatePeriod").Select <---- ERROR ON THIS LINE
Period = Range("a6").Value

This macro seemed to work fine until I added a form to

the
spreadsheet. Is the form causing issues related to the
class I'm using?

TIA.
Dana



.

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
RUNTIME ERROR '1004' --- Select method of worksheet class failed jawee Excel Programming 2 April 30th 04 06:47 AM
excel97: runtime error 1004 select method of range class failed JMCN Excel Programming 4 December 25th 03 05:32 AM
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 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"