View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
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!
|
|