Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Need Help with Run-time error

Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a macro to
play the file.
I want to Protect the sheet. When I play the file when the sheet is lock I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Need Help with Run-time error

you cannot select locked objects. you either have to unprotect the
sheet during th macro, or unprotect the object
Digital2k wrote:
Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a macro to
play the file.
I want to Protect the sheet. When I play the file when the sheet is lock I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Need Help with Run-time error

Just take protection off

Play Macro

Activesheet.Unprotect
ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
Activesheet.Protect
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a macro

to
play the file.
I want to Protect the sheet. When I play the file when the sheet is lock I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Need Help with Run-time error

I thought excel can do almost anything. I'm sure there must be a way to have
my spreadsheet locked and have the ability to play a file. I have a picture
as the object linked to the macro to play the file and it is unprotected.
This is the error: Method 'Select' of object 'Shape' failed.
Can anyone help?
Thanks,
Digital2k

"Bob Phillips" wrote in message
...
Just take protection off

Play Macro

Activesheet.Unprotect
ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
Activesheet.Protect
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a macro

to
play the file.
I want to Protect the sheet. When I play the file when the sheet is lock
I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Need Help with Run-time error

My suggestion was to temporarily remove it and then put it back, via code.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
I thought excel can do almost anything. I'm sure there must be a way to

have
my spreadsheet locked and have the ability to play a file. I have a

picture
as the object linked to the macro to play the file and it is unprotected.
This is the error: Method 'Select' of object 'Shape' failed.
Can anyone help?
Thanks,
Digital2k

"Bob Phillips" wrote in message
...
Just take protection off

Play Macro

Activesheet.Unprotect
ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
Activesheet.Protect
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a

macro
to
play the file.
I want to Protect the sheet. When I play the file when the sheet is

lock
I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Need Help with Run-time error

Thank you Bob!
That worked

"Bob Phillips" wrote in message
...
My suggestion was to temporarily remove it and then put it back, via code.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
I thought excel can do almost anything. I'm sure there must be a way to

have
my spreadsheet locked and have the ability to play a file. I have a

picture
as the object linked to the macro to play the file and it is unprotected.
This is the error: Method 'Select' of object 'Shape' failed.
Can anyone help?
Thanks,
Digital2k

"Bob Phillips" wrote in message
...
Just take protection off

Play Macro

Activesheet.Unprotect
ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
Activesheet.Protect
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Digital2k" wrote in message
...
Hello Group,

I have a excel spreadsheet (2003) that has a wave file. I created a

macro
to
play the file.
I want to Protect the sheet. When I play the file when the sheet is

lock
I
get a Run-time error.
This is the macro:

Play Macro

ActiveSheet.Shapes("Object 100").Select
Selection.Verb Verb:=xlPrimary
Range("B8").Select
End Sub

When I select debug this is the line that is highlighted:
ActiveSheet.Shapes("Object 100").Select

Any help on this matter is appreciated.
Digital2k










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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) Tim[_36_] Excel Programming 4 April 23rd 04 02:53 AM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 07:45 PM


All times are GMT +1. The time now is 02:54 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"