Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Unlock cells in other open workbook

Hi. Is there a way to have excel perform code on the only xls workbook open
OTHER THAN the one with the code?

That sounded really bad. Specifically, I want to email out a small
procedure in a workbook that unlocks a group of cells. I was hoping to
simply instruct the user to close out of all other xls workbooks, then push
a button on the workbook I send. I would normally specifically call the
workbook name, but users may have renamed their template. So, I don't want
activeworkbook, and I don't want thisworkbook, I need "only other workbook
open besides the active wrokbook"! Possible? Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Unlock cells in other open workbook

You might try something like this:

Sub a()
Dim WB As Workbook
For Each WB In Workbooks
If WB.Name < ThisWorkbook.Name Then
If WB.Windows(1).Visible Then ''Don't find a hidden WB like Personal
WB.ActiveSheet.Range("A1").Value = 1
Exit For
End If
End If
Next
End Sub


--
Jim
"Steph" wrote in message
...
| Hi. Is there a way to have excel perform code on the only xls workbook
open
| OTHER THAN the one with the code?
|
| That sounded really bad. Specifically, I want to email out a small
| procedure in a workbook that unlocks a group of cells. I was hoping to
| simply instruct the user to close out of all other xls workbooks, then
push
| a button on the workbook I send. I would normally specifically call the
| workbook name, but users may have renamed their template. So, I don't
want
| activeworkbook, and I don't want thisworkbook, I need "only other workbook
| open besides the active wrokbook"! Possible? Thanks!
|
|


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
How to unlock workbook? ADT57 Excel Discussion (Misc queries) 1 April 29th 10 03:58 PM
Unable to Unlock Workbook Adrian Excel Worksheet Functions 1 March 26th 10 04:16 PM
How to unlock the password for the exel workbook nag Excel Discussion (Misc queries) 1 September 5th 07 09:39 PM
how do i password protect an .xls file? how do i unlock it for automation. e.g. want to unlock and access a .xls from another .xls macro. Daniel Excel Worksheet Functions 1 June 24th 05 02:59 PM
how to unlock a workbook Mellissa Excel Worksheet Functions 1 March 18th 05 02:17 PM


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

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"