Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Is there a way to make a sheet viewable but not selectable?

I have a work book with multiple sheets. I want the user to be able to
select sheet 1 to access macro buttons. I want them to be able to view the
results of the macro data entries on sheet 2, but I do not want them to be
able to directly modify or even select sheet 2, only view the entered data.

I can't simply protect the worksheet, because new data is being added and
old data changed.

I tried changing the worksheet properties in VBA, EnableSelection to "No
Selection", but that did not seem to have an effect.

Help? Is this possible?

-Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Is there a way to make a sheet viewable but not selectable?

Hi Bill,

"I can't simply protect the worksheet, because new data is being added and
old data changed."

If I understand your problem correctly, you actually can protect the sheet,
with the UserInterfaceOnly option, if you are using XL 2000 or later. This
allows you to change the sheet through code, while keeping the sheet
protected. You need to set this property each time the workbook is opened -
it doesn't persist after the workbook is closed.

hth,

Doug


"Bill" wrote in message
...
I have a work book with multiple sheets. I want the user to be able to
select sheet 1 to access macro buttons. I want them to be able to view
the
results of the macro data entries on sheet 2, but I do not want them to be
able to directly modify or even select sheet 2, only view the entered
data.

I can't simply protect the worksheet, because new data is being added and
old data changed.

I tried changing the worksheet properties in VBA, EnableSelection to "No
Selection", but that did not seem to have an effect.

Help? Is this possible?

-Bill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Is there a way to make a sheet viewable but not selectable?

Doug,
Thanks for the response . Yes, I am using Excel 2003.
Now, for a newbie at this, comes the next question ...
.... Where do I set the UserInterfaceOnly option, and how can I
automatically set it each time the workbook is opened.

TIA

Bill

"Doug Glancy" wrote:

Hi Bill,

"I can't simply protect the worksheet, because new data is being added and
old data changed."

If I understand your problem correctly, you actually can protect the sheet,
with the UserInterfaceOnly option, if you are using XL 2000 or later. This
allows you to change the sheet through code, while keeping the sheet
protected. You need to set this property each time the workbook is opened -
it doesn't persist after the workbook is closed.

hth,

Doug


"Bill" wrote in message
...
I have a work book with multiple sheets. I want the user to be able to
select sheet 1 to access macro buttons. I want them to be able to view
the
results of the macro data entries on sheet 2, but I do not want them to be
able to directly modify or even select sheet 2, only view the entered
data.

I can't simply protect the worksheet, because new data is being added and
old data changed.

I tried changing the worksheet properties in VBA, EnableSelection to "No
Selection", but that did not seem to have an effect.

Help? Is this possible?

-Bill




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Is there a way to make a sheet viewable but not selectable?

Bill,

You need to create a WorkbookOpen event sub in the ThisWorkbook module.

In the VBE (Visual Basic Editor) put this code into the ThisWorkbook module.
This will protect Sheet1:

Private Sub Workbook_Open()
Worksheets("Sheet1").Protect userinterfaceonly:=True
End Sub

hth,

Doug

"Bill" wrote in message
...
Doug,
Thanks for the response . Yes, I am using Excel 2003.
Now, for a newbie at this, comes the next question ...
... Where do I set the UserInterfaceOnly option, and how can I
automatically set it each time the workbook is opened.

TIA

Bill

"Doug Glancy" wrote:

Hi Bill,

"I can't simply protect the worksheet, because new data is being added

and
old data changed."

If I understand your problem correctly, you actually can protect the

sheet,
with the UserInterfaceOnly option, if you are using XL 2000 or later.

This
allows you to change the sheet through code, while keeping the sheet
protected. You need to set this property each time the workbook is

opened -
it doesn't persist after the workbook is closed.

hth,

Doug


"Bill" wrote in message
...
I have a work book with multiple sheets. I want the user to be able to
select sheet 1 to access macro buttons. I want them to be able to

view
the
results of the macro data entries on sheet 2, but I do not want them

to be
able to directly modify or even select sheet 2, only view the entered
data.

I can't simply protect the worksheet, because new data is being added

and
old data changed.

I tried changing the worksheet properties in VBA, EnableSelection to

"No
Selection", but that did not seem to have an effect.

Help? Is this possible?

-Bill






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Is there a way to make a sheet viewable but not selectable?

Doug,

Perfect! Just what I ws looking for.
Thank You.

-Bill

"Doug Glancy" wrote:

Bill,

You need to create a WorkbookOpen event sub in the ThisWorkbook module.

In the VBE (Visual Basic Editor) put this code into the ThisWorkbook module.
This will protect Sheet1:

Private Sub Workbook_Open()
Worksheets("Sheet1").Protect userinterfaceonly:=True
End Sub

hth,

Doug

"Bill" wrote in message
...
Doug,
Thanks for the response . Yes, I am using Excel 2003.
Now, for a newbie at this, comes the next question ...
... Where do I set the UserInterfaceOnly option, and how can I
automatically set it each time the workbook is opened.

TIA

Bill

"Doug Glancy" wrote:

Hi Bill,

"I can't simply protect the worksheet, because new data is being added

and
old data changed."

If I understand your problem correctly, you actually can protect the

sheet,
with the UserInterfaceOnly option, if you are using XL 2000 or later.

This
allows you to change the sheet through code, while keeping the sheet
protected. You need to set this property each time the workbook is

opened -
it doesn't persist after the workbook is closed.

hth,

Doug


"Bill" wrote in message
...
I have a work book with multiple sheets. I want the user to be able to
select sheet 1 to access macro buttons. I want them to be able to

view
the
results of the macro data entries on sheet 2, but I do not want them

to be
able to directly modify or even select sheet 2, only view the entered
data.

I can't simply protect the worksheet, because new data is being added

and
old data changed.

I tried changing the worksheet properties in VBA, EnableSelection to

"No
Selection", but that did not seem to have an effect.

Help? Is this possible?

-Bill








  #6   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default Is there a way to make a sheet viewable but not selectable?

Hi Bill,

..EnableSelection is a worksheet property that uses built-in constants for
the settings. It's used separately from .Protect -as follows:

ActiveSheet.EnableSelection = xlNoSelection ' (or xlUnlockedCells if
some cells require user access) Note the required "xl" prefix. This should
make it work for you.

Regards,
GS
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
Can I make a worksheet protected, locked AND not viewable? MBozeman Excel Discussion (Misc queries) 2 March 13th 10 11:31 PM
Can I make rows of an excell spreadsheet 'selectable' (on/off)? ralph r Excel Worksheet Functions 3 November 14th 05 04:20 PM
How do I make a line non-selectable? Shinka Excel Discussion (Misc queries) 4 October 5th 05 09:25 PM
How to make Add-In worksheets viewable. Bing Excel Programming 2 January 5th 05 06:11 PM
Write data to a cell, then make it undeletable/selectable Christy[_7_] Excel Programming 1 April 6th 04 03:57 AM


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