Why when I use hide columns / rows the undo does not work.

When I put commands in the spreadsheet with the right 
click and view code, then following this, the undo command 
no longer works.  However, after I remove the code it (the 
undo) works again.   Can you explain?
===================================================== 

Private Sub Worksheet_Change(ByVal Target As Range)
Set TestCell = Range("AZ19")
TestValue = "x"
If TestCell = TestValue Then
  
  Range("A18:a20").EntireRow.Hidden = True
  Else
  Range("A18:a20").EntireRow.Hidden = False
  End If

  
End Sub
=======================================================

Thanks Nils!
0
anonymous (74722)
10/28/2003 11:12:54 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
381 Views

Similar Articles

[PageSpeed] 49

Many macro functions reset XL's Undo. Since XL can't tell what was 
done in the macro, it doesn't allow undo's after the macro was run.


In article <03b301c39da9$045e0410$a601280a@phx.gbl>,
 "Nils" <anonymous@discussions.microsoft.com> wrote:

> When I put commands in the spreadsheet with the right 
> click and view code, then following this, the undo command 
> no longer works.  However, after I remove the code it (the 
> undo) works again.   Can you explain?
> ===================================================== 
> 
> Private Sub Worksheet_Change(ByVal Target As Range)
> Set TestCell = Range("AZ19")
> TestValue = "x"
> If TestCell = TestValue Then
>   
>   Range("A18:a20").EntireRow.Hidden = True
>   Else
>   Range("A18:a20").EntireRow.Hidden = False
>   End If
> 
>   
> End Sub
> =======================================================
> 
> Thanks Nils!
0
jemcgimpsey (6723)
10/28/2003 11:29:26 PM
Nils,

Actions performed by macros aren't undoable.

-- 
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Nils" <anonymous@discussions.microsoft.com> wrote in message
news:03b301c39da9$045e0410$a601280a@phx.gbl...
> When I put commands in the spreadsheet with the right
> click and view code, then following this, the undo command
> no longer works.  However, after I remove the code it (the
> undo) works again.   Can you explain?
> =====================================================
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Set TestCell = Range("AZ19")
> TestValue = "x"
> If TestCell = TestValue Then
>
>   Range("A18:a20").EntireRow.Hidden = True
>   Else
>   Range("A18:a20").EntireRow.Hidden = False
>   End If
>
>
> End Sub
> =======================================================
>
> Thanks Nils!


0
nowhere8060 (363)
10/28/2003 11:34:33 PM
Reply:

Similar Artilces:

Work-around
Is there a temporary work around using the web version? I can view using the web, however, when I try to edit a document, it attempts to open Document Connection and I get the authentication error. Yes: Download the document to your hard drive, edit it, then re-save it back to the web. On 18/03/10 11:52 PM, in article 1ec6308d-c2e2-497a-94ce-6f40bf9262a4@g26g2000yqn.googlegroups.com, "rtbrookstx" <rtbrookstx@gmail.com> wrote: > Is there a temporary work around using the web version? I can view > using the web, however, when I try to edit a document, i...

MIN function not working
I have a column of times formatted with the custom format of: custom format - dd "days" hh "hours" mm "minutes" I need to find the maximum and minimum times in the column. =MAX(F2:F500) returns 01 days 16 hours 19 minutes =MIN(F2:F500) should return 00 days 00 hours 05 minutes but in fact the cell containing the formula has no value. Any ideas what could be wrong? Any help gratefully appreciated. Gavin Hi how did you format the resulting cell? -- Regards Frank Kabel Frankfurt, Germany "gavin" <no-one@home.com> schrieb im Newsbeit...

Lookup Outlook Contact does not work
Hello everyone, I have Outlook 2007 with configured MAPI e-mail account for corporate Kerio MailServer 6. My contact folder is included into Outlook Address Book however: - Lookup Outlook Contact does not work; - contact picture is not show for incoming messages; - way Outlook displays From field differs from specified in corresponding Outlook contact. Any ideas? Thanks in advance. Regards, Shahin Musayev You are using the Kerio Outlook Connector? Have you checked their support site? Does the connector add it's own address book to outlook? Do you see your Cont...

eseutil /p didnt work
Hi! I was trying to do an information store restore because it got corrupted due to unexpected shutdown. I ran eseutil /p and defragmenter right after. But when I check for database integrity using isinteg, I got an error. What do I do knowing that this process didn't work? Im using windows 2003 and exchange 2003. Unfortunately the backup i have is not credible. Thank you. On Sun, 28 Aug 2005 05:53:04 -0700, "Arthus Lim" <ArthusLim@discussions.microsoft.com> wrote: >Hi! I was trying to do an information store restore because it got corrupted >due to unex...

How do you create a list with name address phone in a column form.
I have an excel file with last name, first address city state in each column. I want to prepare a two column report with each persons name first then address then phone. Can't remember how to print out a different view of excel. Making it look more like a two column word document. Maybe you can use MSWord's MailMerge. http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. denise108 wrote: > > I have an excel file with last name, first address city state ...

Some poor slob installed Ubuntu. Needs to run line commands to get that piece of crap to work
I installed ubuntu 9.10 and it was rebooting just before the login screen. After really long search it turned out it's the video driver, I guess the one coming with ubuntu didn't like my card. I have integrated Radeon HD3200. What worked for me: 1. Select recovery mode from grub menu (in your case for 9.10 too) 2. In the first following screen select "root with networking" to have internet 3. Install video driver package EnvyNG with: sudo apt-get install envyng-core envyng-qt <==================== line commands to get sucky Ubuntu to work. Oops. 4. Run i...

Why can't Microsoft ever make a software that "Works"?
What is so great about this version of Office'2003???? Why did they have come out with a software that is worse than its old version? Outlook always invariably has problems in connecting to IMAP/SMTP servers. When outlook express can do it better. I am not able to change the layout of the print out to Landscape. I was happy with the old one, can Microsoft take my new software back and pay me the money????? I think in trying to pack with more features, MS is forgetting that the software is expected to do what it basically meant to. Repack your Office software. Return it to th...

columns show as numbers
I just noticed that all of my columns now show up as numbers instead of letters, which makes it difficult for entering formulas - how do I get the columns back to letters Tools, Options, General, (uncheck) R1C1 reference style --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "jbv" <anonymous@discussions.microsoft.com> wrote in message news:B43F64D5-7296-43AB-A137-98F623BC5236@microsoft.com... > I just noticed tha...

How do I use outlook
I just opened outlook and am trying to use it, but I just can't figure it out. I have setup 2 email accounts and both tested ok, but it still won't send or receive a message. I need someone to give me step by step instructions because I am so frustrated!!! http://www.outlook-tips.net/beginner/ --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, madrid1 asked: | I just opened outlook and am trying to use it, but I just can&#...

How to restrict the use of a workbook to one computer?
Hi, I need to restrict the use of a workbook to one computer. Is there some way to do this? Thanks in anticipation. Ivar Ivar, Not reliably from within Excel. If I want to use your file on another computer, I will be able to figure a way around whatever you do, unless you do something within a compiled DLL or XLL module. HTH, Bernie MS Excel MVP "Ivar" <ivarcarstensen@hotmail.com> wrote in message news:d8040973.0406300609.6cd00f1@posting.google.com... > Hi, > > I need to restrict the use of a workbook to one computer. > Is there some way to do this? > >...

delegates permission using a distribution list
I am having problems with permissions on delegates in Outlook. I have a distribution list which has editor rights in a users calendar. When I try and access the calendar it doesn't work. When I go back into the delegates properties again the permission has gone back to NONE. It does however work fine on some clients. Outlook 2000 is being used and Exchange 2003. Convert the DL to a security group. "Gareth Hutchins" <anonymous@discussions.microsoft.com> wrote in message news:29a401c4ad33$4bb88de0$a601280a@phx.gbl... > I am having problems with permissions on d...

Using text in a cell in a formula
I need to have a formula use the text of adjacent cells to determine where to look for values. I want to grab data from multiple datasheets but I don't want to have to type the sheet name in every formula, I want the formula to grab the name of the sheet from an adjacent cell. i.e. I need a formula like =if(sheet1!B2>0,100,""), but I need a function that will fill in the sheet name from the text value of an adjacent cell that would have the sheet name in it as I will be doing this for multiple cells on the same sheet. see your other post -- Biff Microsoft...

Registraion number not working for some users
Hi there, Two of my users cannot create a product registration number (Sales-Accounts-select product-Generate registration number) When you click the button the little window appears as it should but within it is a "Page cannot be displayed" message. Other users with the exact same permissions & assigned roles do not have this problem. I have installed the latest hotfix roll-up but this did not correct the error. Any help would be appreciated -Joseph Sounds like you are using a custom add-in or ISV integration. I would check with that vendor first... -- Matt Wittem...

How to alphabetize 8 columns as one?
I have a list of 350 customers that references a grid location. I need to print this list in 8 columns to minimize the pages that print with the map. To get this to print, I have been cutting and pasting; very time consuming when 1 item changes. How can I sort the columns to avoid redoing the print copy each time? The easist way will be to have the actual data stored as a single column. Let's say its located in column A, starting at A1. If you want to make 8 columns, with a limit of 45 entires per column, you could use this formula: =INDEX($A:$A,ROW(A1)+(COLUMN(A1)-1)*45) ...

Help!
and the on-line documentation doesn't give the right help. Outlook on a client machine was set to send an automatic reply to any sender saying that the manager is away on holidays. The program works through the Exchange server on a Windows 2003 server (as required). The version of the Exchange Server is 6.## running on server 2003 R2. I am away from the computers as I write this but I also configured the Exchange Server to do auto replies. Sending a test message to the manager's e-mail user name as configured does not produce an auto reply as it's supposed to. I...

Outlook 2002-Csnt use my address book
When I try to use my reinstalled version of Outlook 203 I get the following error concerning my CONTACTS FOLDER... "The address book could not be displayed. The Contents folder associated with the address list could not be opened; it may have been moved or deleted, or you do not have permissions." I have copied my old mail from a previous installation of Outlook 2002 to this version, and now get this error. I cannot delete any of the items in the address list. I am unsure of what caused this or how to fix it. I also would NOT like to loose all my addrees. PLEASE HELP. DavidF...

System process using port 6106
Guys can the system process port be changed? It's using port 6106 which Symantec BE requires and it won't startup the application if it can't use this port. Any ideas guys? ...

help with quote program using muliple prices for one quantity {cross post}
Okay, Forgive me ahead of time, I really don't know much about Excel. I can work with templates and create simple formulas but alot of what I read here comes across as "Excelspeak" to me. Here is what I want to do: I have a price list sheet created. This price list has cells labled by name and then "duration", basically for every item there are four prices, based on duration of a rental or sale. I want to create a quote program that will pull data from the price list based on the quantities entered in the quote program. For example Price list is "System A, des...

How do I change row names from A to something else in Excel?
I will like to change row and column labels from standard to my own is there a way? e.g. instead of A, B, C and so on can I not name them looks more professional. You can hide the column headers (tools>Options>View); that will also hide the row numbers. Use Row 1 for labels, use Windows>Freeze Panes to keep Row 1 visible -- Kind Regards, Niek Otten Microsoft MVP - Excel "laidbackmate" <laidbackmate@discussions.microsoft.com> wrote in message news:7476C4AB-2DDC-4C1A-8C73-227FD0E009C7@microsoft.com... >I will like to change row and column labels from standa...

Use relationships with leads
Hallo to all, i want to use, the customer relationships that we use with accounts and constacts, with leads as well. Is it possible? Thank you in advance, Vasiliki Sioti Do you mean that you want to associate a lead with a contact and company? If so, this is not the way that CRM is designed to work. A lead is designed to contain the account and contact info. "vaso" wrote: > Hallo to all, > i want to use, the customer relationships that we use with accounts and > constacts, with leads as well. Is it possible? > > Thank you in advance, > Vasiliki Sioti Dea...

Formula to work out someones age
I am putting together a database using excel and wish to enter a persons date of birth as a column and then have excel work out the persons age in the next column. Can anyone tell me the formula I should be using to do this? I'm using excel 97 on windows 95 Regards Mike music.bus@virgin.net --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 01/09/03 one way: =DATEDIF(A1, TODAY(),"y") where A1 contains the birthdate In article <HcI7b.277$eW.304297@newsfep...

Copying multiple columns not adjacent
Is there a way that columns A B C F & G can be copied without including D E & F? When I hide them, copy and then paste, it still includes the hidden columns. Hold the control key as you click on the column's you want to copy. Then copy and paste to the new sheet. "Doug Wilson" wrote: > Is there a way that columns A B C F & G can be copied without including D E & > F? When I hide them, copy and then paste, it still includes the hidden > columns. Couple of ways. Select A, B, and C, Hold <Ctrl>, Select F, and G, Then right click in the sel...

FILE TRANSFER USING MFC CAsyncSocket::OnAccept()
Hello I am new to VC++. For a project I am working on, I need to implement a file transfer application, a chat application and a file retrieve from remote device ..... this is something like microsoft net meeting . if anyone has implemented these , kindly let us know how did u go about it. Will CAsynchSocket class work for File Transfer..as our application uses it , and it is not working! There is a problem in the CASyncSocket::OnAccept() function, it is not being called internally Akanksha I have Used a LoopBack address as running client server on same machine ...

How to mix a stacked column and a clustered one on same graph?
I want to display on the same graph 2 subtotal informations letùs say sub1 and sub2 for 10 years to show decrease of one and increase of the other in parallel. The best is then to used clustered column. But sub1 is build for 2 products5(A and B) and sub2 is coming from 3 infos D,E and F. I would like then to see the split between A and B on the first column representing sub1 and the same for sub2. It will then be on stacked columns. Is it possible? Thanks Jon Peltier has information and links for clustered stacked columns on his web site: http://peltiertech.com/Excel/ChartsH...

Word APA referencing bug (or am I using it wrong)
Hi, I am trying to use the Mac Word 2008 referencing feature. There seems to be a bug. If I create a reference to a source, for example written by John Smith, that has no date the in-text citation should be in this format: (Smith, n.d.) what Word currently does is (Smith) Is there anyway for me to fix this? Thanks On Apr 25, 10:38=A0pm, Will <will.va...@gmail.com> wrote: > Hi, > > I am trying to use the Mac Word 2008 referencing feature. There seems > to be a bug. > > If I create a reference to a source, for example written by John > Smith, that has no date ...