Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Formatting Cells

I have designed a worksheet that I want to use for
quotes. I am able to print out the worksheet and it looks
just fine. However, I would like to format the worksheet
so that every cell that is not used in the worksheet can
not even be "clicked". In other words, I would like to
make those unused cells part of the background.

I have not designed this sheet in form view because I am
not familiar with that.

If anyone has any ideas how to do this, please let me
know. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Formatting Cells

dyowell, you could use something like this, unprotect the cells you want to
select
then put this in the thisworkbook code

Private Sub Workbook_Open()
'will not let you select locked cells
'This is a setting that Excel does not remember between closings, so this
'will run each time you open the workbook

'*******change to your sheet name***********
With Worksheets("sheet1")

.Activate
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, UserInterfaceOnly:=True
End With
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **


"dyowell" wrote in message
...
I have designed a worksheet that I want to use for
quotes. I am able to print out the worksheet and it looks
just fine. However, I would like to format the worksheet
so that every cell that is not used in the worksheet can
not even be "clicked". In other words, I would like to
make those unused cells part of the background.

I have not designed this sheet in form view because I am
not familiar with that.

If anyone has any ideas how to do this, please let me
know. Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formatting Cells


As I said in my original message, I do not have any experience at VB or
working with forms. Therefore, I am not familiar with codes. When you
say "unprotect all of the cells that I want to select and then put this
in the workbook code", what do you mean. Where is the "workbook code"?
Also, what does the following mean:

'*******change to your sheet name***********
With Worksheets("sheet1")

.Activate
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Sorry for the stupid questions, but I'm afraid that I just do not
understand what you are talking about. Thanks for the help.







*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Formatting Cells

Unlock the cells you want to allow editing/selection

make the control toolbox toolbar visible and click on the properties button.

Under the enable selection property, select unlocked cells

then go to Tools=Protect =Protect sheet.

Do this each time you open the workbook.

--
Regards,
Tom Ogilvy



"David Yowell" wrote in message
...

As I said in my original message, I do not have any experience at VB or
working with forms. Therefore, I am not familiar with codes. When you
say "unprotect all of the cells that I want to select and then put this
in the workbook code", what do you mean. Where is the "workbook code"?
Also, what does the following mean:

'*******change to your sheet name***********
With Worksheets("sheet1")

.Activate
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Sorry for the stupid questions, but I'm afraid that I just do not
understand what you are talking about. Thanks for the help.







*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default Formatting Cells

David,
To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is to the left of the "File" menu this will open
the VBA editor, in the left hand window double click on thisworkbook, under
your workbook name, and paste the code in the window that opens on the right
hand side, press Alt and Q to close this window and go back to your
workbook, now this will run every time you open the workbook. If you are
using excel 2000 or newer you may have to change the macro security
settings to get the macro to run.

'*******change to your sheet name***********
With Worksheets("sheet1")

Change sheet1 to the name of the worksheet tab name of the sheet you are
using.

"unprotect all of the cells that I want to select "
Select the cells you want to enter data in, select the first one and hold
down the Ctrl key and click on the others, then format, cells, protection,
and uncheck locked, OK. Save the workbook, close it and then open it again,
you should then only be able to select the cells that you unlocked


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **


"David Yowell" wrote in message
...

As I said in my original message, I do not have any experience at VB or
working with forms. Therefore, I am not familiar with codes. When you
say "unprotect all of the cells that I want to select and then put this
in the workbook code", what do you mean. Where is the "workbook code"?
Also, what does the following mean:

'*******change to your sheet name***********
With Worksheets("sheet1")

.Activate
.EnableSelection = xlUnlockedCells
.Protect Contents:=True, UserInterfaceOnly:=True
End With
End Sub

Sorry for the stupid questions, but I'm afraid that I just do not
understand what you are talking about. Thanks for the help.







*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
condionally formatting based on another cells formatting? Derrick Excel Discussion (Misc queries) 2 July 31st 09 08:05 PM
conditionally formatting cells based on other cells Derrick Excel Discussion (Misc queries) 1 July 7th 09 09:43 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Conditional Formatting Multiple cells based on 2 cells Louis Markowski Excel Worksheet Functions 2 June 1st 05 05:26 PM
Formatting Cells chmartz Excel Worksheet Functions 2 May 3rd 05 12:30 AM


All times are GMT +1. The time now is 09:35 AM.

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"