Hi Ashish Thanks for that. How do I toggle the 'TabOrder' on ? At the moment the tab order is not working.
Thanks Charlie On Thu, Jul 21, 2011 at 7:08 PM, ashish koul <koul.ash...@gmail.com> wrote: > try this > > > On Thu, Jul 21, 2011 at 11:36 AM, Cab Boose <swch...@gmail.com> wrote: > >> Hi Rajan >> >> >> >> I have attached copy of the sheet involved. >> >> >> Let me know what you think. >> >> Thanks >> >> Charlie >> >> On Wed, Jul 20, 2011 at 9:19 PM, Rajan_Verma >> <rajanverma1...@gmail.com>wrote: >> >>> *Would you please attached Workbook.* >>> >>> * * >>> >>> *From:* excel-macros@googlegroups.com [mailto: >>> excel-macros@googlegroups.com] *On Behalf Of *Cab Boose >>> *Sent:* Wednesday, July 20, 2011 2:10 PM >>> *To:* excel-macros@googlegroups.com >>> *Subject:* $$Excel-Macros$$ Data Input Sheet - Deleting Entries - all >>> added data deletes**** >>> >>> ** ** >>> >>> Hi everyone**** >>> >>> **** >>> >>> Excel 2000 Win7**** >>> >>> **** >>> >>> I am using code below to enter data onto a sheet. The sheet works well >>> in entering data, but when you go back to an entry above and delete the >>> current data and put in the correct data, on the delete key it deletes all >>> data entered and user has to start over again.**** >>> >>> **** >>> >>> How to stop all data entered being deleted ?:**** >>> >>> **** >>> >>> Thanks**** >>> >>> **** >>> >>> Charlie**** >>> >>> **** >>> >>> **** >>> >>> ********************************** >>> >>> **** >>> >>> Private Sub Worksheet_SelectionChange(ByVal Target As Range) >>> 'Establishes tab order for data entry. Hit Enter or Tab keys to jump to >>> the next cell. >>> >>> Dim TabOrder As Variant, X As Variant >>> Dim addr As String >>> Dim rg As Range, targ As Range >>> If TabOrderFlag = True Then Exit Sub >>> >>> TabOrder = Array("h8", "h9", "h10", "h11", "h13", "l11", "l12", "h17", >>> "k17", "h18", "k18", "k21", "k22", "n26", "n27", "n31", _ >>> "k37", "e82", "f82", "h82", "j82", "e83", "f83", "h83", "j83", "e84", >>> "f84", "h84", "j84", "e85", "f85", "h85", _ >>> "j85", "e86", "f86", "h86", "j86", "e87", "f87", "h87", "j87", "e88", >>> "f88", "h88", "j88", "e89", "f89", _ >>> "h89", "j89") >>> >>> 'List your cell addresses in desired tab order here >>> For Each X In TabOrder >>> If rg Is Nothing Then >>> Set rg = Range(X) >>> Else >>> Set rg = Union(rg, Range(X)) >>> End If >>> Next >>> >>> Set targ = Intersect(rg, Target) >>> rg.Select >>> If targ Is Nothing Then >>> addr = Target.Cells(1, 1).Address(ColumnAbsolute:=False, >>> RowAbsolute:=False) >>> X = Application.Match(addr, TabOrder, 0) >>> If IsError(X) Then Range(TabOrder(LBound(TabOrder))).Activate >>> Else >>> targ.Activate >>> End If >>> >>> End Sub **** >>> >>> -- >>> >>> ---------------------------------------------------------------------------------- >>> Some important links for excel users: >>> 1. Follow us on TWITTER for tips tricks and links : >>> http://twitter.com/exceldailytip >>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >>> 3. Excel tutorials at http://www.excel-macros.blogspot.com >>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >>> >>> To post to this group, send email to excel-macros@googlegroups.com >>> >>> <><><><><><><><><><><><><><><><><><><><><><> >>> Like our page on facebook , Just follow below link >>> http://www.facebook.com/discussexcel**** >>> >>> -- >>> >>> ---------------------------------------------------------------------------------- >>> Some important links for excel users: >>> 1. Follow us on TWITTER for tips tricks and links : >>> http://twitter.com/exceldailytip >>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >>> 3. Excel tutorials at http://www.excel-macros.blogspot.com >>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >>> >>> To post to this group, send email to excel-macros@googlegroups.com >>> >>> <><><><><><><><><><><><><><><><><><><><><><> >>> Like our page on facebook , Just follow below link >>> http://www.facebook.com/discussexcel >>> >> >> -- >> >> ---------------------------------------------------------------------------------- >> Some important links for excel users: >> 1. Follow us on TWITTER for tips tricks and links : >> http://twitter.com/exceldailytip >> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 >> 3. Excel tutorials at http://www.excel-macros.blogspot.com >> 4. Learn VBA Macros at http://www.quickvba.blogspot.com >> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com >> >> To post to this group, send email to excel-macros@googlegroups.com >> >> <><><><><><><><><><><><><><><><><><><><><><> >> Like our page on facebook , Just follow below link >> http://www.facebook.com/discussexcel >> > > > > -- > *Regards* > * * > *Ashish Koul* > *akoul*.*blogspot*.com <http://akoul.blogspot.com/> > http://akoul.posterous.com/ > *akoul*.wordpress.com <http://akoul.wordpress.com/> > My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> > > > P Before printing, think about the environment. > > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel