J
Jado
Hi Dave
i ran what i needed and got the following error: 'Show method of Dialog
class failed'
Any Ideas why??
Thanks Jado
---------------------------------------------
How about letting them select a range (you could check to make sure it's ok
with
you in code), then show the dialog, then fill the cells.
Option Explicit
Sub testme()
Dim myRng As Range
With ActiveSheet
'a specific cell
Set myRng = .Range("a1")
'for just the first cell in the selection
Set myRng = Selection(1)
'for all the selected cells
Set myRng = Selection
.Unprotect Password:="hi"
Application.Dialogs(xlDialogPatterns).Show
.Protect Password:="hi"
End With
End Sub
i ran what i needed and got the following error: 'Show method of Dialog
class failed'
Any Ideas why??
Thanks Jado
---------------------------------------------
How about letting them select a range (you could check to make sure it's ok
with
you in code), then show the dialog, then fill the cells.
Option Explicit
Sub testme()
Dim myRng As Range
With ActiveSheet
'a specific cell
Set myRng = .Range("a1")
'for just the first cell in the selection
Set myRng = Selection(1)
'for all the selected cells
Set myRng = Selection
.Unprotect Password:="hi"
Application.Dialogs(xlDialogPatterns).Show
.Protect Password:="hi"
End With
End Sub