473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Tab key won't work

4
I have created a protected worksheet that allows the user to input data into certain cells of the worksheet. They can alter the whole worksheet through some command buttons that I have created. The VB code I have used to re-protect the worksheet is as follows.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

The problem I want to fix is in these protected sheets the tab key won't work. More specifically I want the user to be able to navigate through the columns Mon thru Fri using the tab key instead of using arrow keys or mouse clicks.

If you are unfamiliar with this procedure in excel: if I start in (row 2, Mon), tab, (row 2, tues) tab (wed) tab (thurs) tab (fri) enter (row 3, Mon). This allows much easier data entry.

Can you help me turn the tab key back on?

Thanks,
z
Jan 11 '08 #1
3 3148
Killer42
8,435 Expert 8TB
We might need more detail (and perhaps to see more of the code) before we can help much. But you do know, don't you, that if a range is selected, tab can only move the focus around within that selection?
Jan 11 '08 #2
zayyaz
4
Here is the code for creating a new week (worksheet) in my workbook. One of a number of similar command buttons that needs to unprotect and re-protect sheets.

Expand|Select|Wrap|Line Numbers
  1. Private Sub AddWeek_Click()
  2.     Dim Week_of, week, Prev_week, prev_bal As String, num As Integer
  3.     num = 0
  4.     ActiveWorkbook.Unprotect
  5.     For Each ws In Worksheets
  6.         num = num + 1
  7.     Next ws
  8.     Prev_week = Sheets(num).Name
  9.     prev_bal = "='" & Prev_week & "'!K3"
  10.     week = month & "/" & day & "/" & year
  11.     Week_of = month & "_" & day & "_" & year
  12.     Sheets("Template").Select
  13.     Sheets("Template").Copy After:=Sheets(num)
  14.     Sheets("Template (2)").Select
  15.     Sheets("Template (2)").Name = Week_of
  16.     ActiveSheet.Unprotect
  17.     Sheets(Week_of).Range("H3").Formula = prev_bal
  18.     Sheets(Week_of).Range("H3").Select
  19.     Selection.Copy
  20.     Sheets(Week_of).Range("H4").Select
  21.     Sheets(Week_of).Range(Selection, Selection.End(xlDown)).Select
  22.     Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
  23.         SkipBlanks:=False, Transpose:=False
  24.     Sheets(Week_of).Range("V1").Select
  25.     ActiveCell = "Attendance Records for the week of " & week
  26.     Sheets(Week_of).Range("B3").Select
  27.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  28.     ActiveWorkbook.Protect Structure:=True, Windows:=False
  29.     Unload Me
  30. End Sub
Note: month, day and year are input from a form

I do not specify a range for the protection in each sheet for 2 reasons:
a) The range is in the copied sheet "Template"
b) Specifying a range kept giving me an error message
But the desired range is kept throughout all sheets.

I didn't know that the tab key worked only in the selected range (which makes sense), but regardless it is not working in that range either.

Just protecting the sheet in excel produces the same result, the tab key won't work. Excel 2002 is being used.

Hopefully this is enough info.
Jan 11 '08 #3
Killer42
8,435 Expert 8TB
Where are you leaving the focus? I think I also recall noticing that Tab won't work in a protected sheet unless you start out in an unprotected cell. I could be wrong, but it's probably worth checking.
Jan 13 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Kerry Neilson | last post by:
For the past couple of months, Idle won't start when I invoke it. I am at a complete loss for why this is. When this happens, they python command line still starts, and python works fine...
1
by: Jim | last post by:
Hey guys I DESPERATLY need some help with this small javascript i have on this website. All that it's supposed to do is change the button image once it's pressed but alas... I copy-pasted the code...
3
by: DFS | last post by:
I've been working around this for years (I believe), so I figured someone here might know: Why won't a crosstab query accept a value from a form reference? TRANSFORM...
7
by: simon | last post by:
I have simple html(aspx) page, but vertical height won't work. Even if i had set the height of a table=100%, the table is not 100% height. I spend a lot of time(my real page is more...
3
by: musosdev | last post by:
Hi guys Okay, I've setup my projects to open and compile fine in VS2005 using FPSE and remote web, but it's *really* slow. So I thought I'd have a go at doing it the normal way, by loading from...
11
by: John Ortt | last post by:
Hi everyone. I have a database which I have developed in Access 2000 which is working nicely. The problem is that my customer only has Access 97. I tried to convert the database but the main...
7
by: Eran.Yasso | last post by:
Hi, I have project that automate excel(using Excel COM) which works fine in my home. I took the project from my home to work and tried to build the project but it won't built. I get error "The...
2
by: scitrenbaum | last post by:
Here is the dilemma. I have a website where everything works perfectly in all browsers except for Safari. When you are in Safari and you go to this page... ...
2
tpgames
by: tpgames | last post by:
Two days ago, MS office Word would type JP fonts, I thought. I didn't think I was using Works. Now, it won't type in JP. Jasc Paint shop pro 8, should type JP fonts because I am using XP, according...
4
by: z55177 | last post by:
My domain: http://www.esthevision.cz/ This is the cause of my problem. The template is supposed to look somewhat like this: PINK STRIPE http://themebot.com/website-templates/ht... I created an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.