ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell properties dialog (https://www.excelbanter.com/excel-programming/326552-cell-properties-dialog.html)

Jos Vens[_2_]

Cell properties dialog
 
Hi,

I'd like to know how I can show the Cell-properties dialog from within VBA?

As my sheet is protected, the cell properties-item is disabled (greyed out)
in the format-menu. But, in a button, I could unprotect the sheet, then
show the dialog, and afterwards, protect again. Or isn't it that simple?

Thanks
Jos Vens



Jim Rech

Cell properties dialog
 
I don't know of any reason your approach shouldn't work.

CommandBars.FindControl(, 855).Execute

--
Jim
"Jos Vens" wrote in message
...
| Hi,
|
| I'd like to know how I can show the Cell-properties dialog from within
VBA?
|
| As my sheet is protected, the cell properties-item is disabled (greyed
out)
| in the format-menu. But, in a button, I could unprotect the sheet, then
| show the dialog, and afterwards, protect again. Or isn't it that simple?
|
| Thanks
| Jos Vens
|
|



Tom Ogilvy

Cell properties dialog
 
Change the takefocusonclick property of the commandbutton to false:

Private Sub CommandButton1_Click()
Me.Unprotect
CommandBars("Cell").ShowPopup
Me.Protect
End Sub

--
Regards,
Tom Ogilvy

"Jos Vens" wrote in message
...
Hi,

I'd like to know how I can show the Cell-properties dialog from within

VBA?

As my sheet is protected, the cell properties-item is disabled (greyed

out)
in the format-menu. But, in a button, I could unprotect the sheet, then
show the dialog, and afterwards, protect again. Or isn't it that simple?

Thanks
Jos Vens





Jos Vens[_2_]

Cell properties dialog
 
Hi guys,

both options are valuable for me! I wonder how I can know the different
numbers to show other menu's/dialogs, like Jim did? Is there a list or
something?

Thanks a lot for your effort!
Jos

"Tom Ogilvy" schreef in bericht
...
Change the takefocusonclick property of the commandbutton to false:

Private Sub CommandButton1_Click()
Me.Unprotect
CommandBars("Cell").ShowPopup
Me.Protect
End Sub

--
Regards,
Tom Ogilvy

"Jos Vens" wrote in message
...
Hi,

I'd like to know how I can show the Cell-properties dialog from within

VBA?

As my sheet is protected, the cell properties-item is disabled (greyed

out)
in the format-menu. But, in a button, I could unprotect the sheet, then
show the dialog, and afterwards, protect again. Or isn't it that simple?

Thanks
Jos Vens







Jim Rech

Cell properties dialog
 
There's only a couple thousand so I memorized them.<g Actually I was
wishing for a quick and easy way but I used this code in the Immediate
window:

?Commandbars("Format").Controls(1).Id



--
Jim
"Jos Vens" wrote in message
...
| Hi guys,
|
| both options are valuable for me! I wonder how I can know the different
| numbers to show other menu's/dialogs, like Jim did? Is there a list or
| something?
|
| Thanks a lot for your effort!
| Jos
|
| "Tom Ogilvy" schreef in bericht
| ...
| Change the takefocusonclick property of the commandbutton to false:
|
| Private Sub CommandButton1_Click()
| Me.Unprotect
| CommandBars("Cell").ShowPopup
| Me.Protect
| End Sub
|
| --
| Regards,
| Tom Ogilvy
|
| "Jos Vens" wrote in message
| ...
| Hi,
|
| I'd like to know how I can show the Cell-properties dialog from within
| VBA?
|
| As my sheet is protected, the cell properties-item is disabled (greyed
| out)
| in the format-menu. But, in a button, I could unprotect the sheet,
then
| show the dialog, and afterwards, protect again. Or isn't it that
simple?
|
| Thanks
| Jos Vens
|
|
|
|
|
|



Jos Vens[_2_]

Cell properties dialog
 
Very useful Jim!

Thanks
Jos


"Jim Rech" schreef in bericht
...
There's only a couple thousand so I memorized them.<g Actually I was
wishing for a quick and easy way but I used this code in the Immediate
window:

?Commandbars("Format").Controls(1).Id



--
Jim
"Jos Vens" wrote in message
...
| Hi guys,
|
| both options are valuable for me! I wonder how I can know the different
| numbers to show other menu's/dialogs, like Jim did? Is there a list or
| something?
|
| Thanks a lot for your effort!
| Jos
|
| "Tom Ogilvy" schreef in bericht
| ...
| Change the takefocusonclick property of the commandbutton to false:
|
| Private Sub CommandButton1_Click()
| Me.Unprotect
| CommandBars("Cell").ShowPopup
| Me.Protect
| End Sub
|
| --
| Regards,
| Tom Ogilvy
|
| "Jos Vens" wrote in message
| ...
| Hi,
|
| I'd like to know how I can show the Cell-properties dialog from
within
| VBA?
|
| As my sheet is protected, the cell properties-item is disabled
(greyed
| out)
| in the format-menu. But, in a button, I could unprotect the sheet,
then
| show the dialog, and afterwards, protect again. Or isn't it that
simple?
|
| Thanks
| Jos Vens
|
|
|
|
|
|






All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com