Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Error when loading a programme from a tool bar

Post opening code from tool bar

Can we assume that the code for direct loading is in the Workshet_Open event?

"Muttley" wrote:

I've set up a macro so that it recognises if the user is from a pre-defined
group when you load the spreadsheet and automatically passwords-unprotects
and moves a few shapes about. If I load up the spreadsheet from the folder
it works fine.

However you can also load it up from a custom tool bar, but if I do this I
get an error
'-2147467259 (800004005)' Method 'select' of objct 'shape' failed
and the password un-protects fails.

From my limited knowledege, I am guessing that when accesing through the
custom menu it is not recognising which spreadsheet to run the password
unprotect macro on and so when it comes to move the shape it is still
password protected (or maybe can't even find the shape?) - can anyone throw
any light on this?

Thx


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Error when loading a programme from a tool bar

I hope this is what you mean:

Public Sub LoadUnitLinkedLifeCalculationSpreadsheet()

Workbooks.Open FileName:="j:\bts\actl\Unit Linked Life Calculations\Unit
Linked Life Calculations.xls"

End Sub

To get the sheet unprotected I changed the code in This Workbook to:

Private Sub Workbook_Open()

frmSplash.Show
Worksheets("ABS").Select
Calculate

If Range("InOrOut") = "BTS" Then Application.Run "BTS_Access_Start"


End Sub

Where "BTS_Access_Start" is the macro that does the whole
unprotecting/shape-moving.

It also works fine when I ok the error messages and run manually.




"Vacation's Over" wrote:

Post opening code from tool bar

Can we assume that the code for direct loading is in the Workshet_Open event?

"Muttley" wrote:

I've set up a macro so that it recognises if the user is from a pre-defined
group when you load the spreadsheet and automatically passwords-unprotects
and moves a few shapes about. If I load up the spreadsheet from the folder
it works fine.

However you can also load it up from a custom tool bar, but if I do this I
get an error
'-2147467259 (800004005)' Method 'select' of objct 'shape' failed
and the password un-protects fails.

From my limited knowledege, I am guessing that when accesing through the
custom menu it is not recognising which spreadsheet to run the password
unprotect macro on and so when it comes to move the shape it is still
password protected (or maybe can't even find the shape?) - can anyone throw
any light on this?

Thx


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
Analysis Tool Pack addin into Excel and it is not loading pcrxtex Excel Discussion (Misc queries) 3 March 25th 08 10:29 PM
run programme error occuring harry buggy Excel Worksheet Functions 2 September 11th 07 12:18 PM
error in programme biker man Excel Discussion (Misc queries) 4 July 26th 07 09:01 PM
Error message Microsoft Graph is part of another programme Alimyb Setting up and Configuration of Excel 0 August 14th 06 11:28 AM
Tool bar keeps loading noyb Excel Discussion (Misc queries) 1 August 3rd 06 06:47 PM


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