Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2005, 10:08 AM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataEntryMode in Excel

Hi all,

I am using DataEntryMode = xlStrict to disable user entry. However, before this code is ran, other code selects a few cells in order to let my program work correctly.
The problem is that I don't want the last selected cell to be editable (which is the case now because I selected cells before the statement. Normally, if you use the statement all cells are deselected because no other cell is selected).

Thanks in advance
Max
 
Old October 6th, 2005, 05:18 AM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just for the other curious ones, here is the solution:

Cells.Locked = True (make all cells in the sheet locked)
Application.DataEntryMode = true

DataEntryMode makes it able to select unlocked cells, so the solution was dead simple (somehow didnt find it at that time).
So when locking all cells, no cell will be able to be selected.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
ASP to Excel - excel output formatting issue mat41 Classic ASP Professional 0 August 13th, 2006 06:41 AM
write multi-sheet Excel w/o Excel.Application manmoth Classic ASP Components 2 November 22nd, 2005 10:56 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.