Macro referencing data validation doesn't work

Version: 2004
Operating System: Mac OS X 10.4 (Tiger)
Processor: Intel

Hi - New to VBA &amp; the forum. <br><br>When I create a macro that references a data validation cell, the code does not acknowledge the value selected from the pull down menu.  But, if the value is manually typed into the data validation cell, the code works fine.  Any ideas?  I've had PC users try the code with no problems.   <br><br>I'm using the following code: <br>
[Code]Private Sub Worksheet_Change(ByVal Target As Range) <br>
If Not Intersect(Target, Range(&quot;A1:A5&quot;)) Is Nothing And _ <br>
&nbsp;&nbsp;&nbsp;&nbsp;Target = &quot;Complete&quot; Then Range(&quot;D&quot; &amp; Target.Row) = Date <br>
End Sub[Code] <br><br>Thank you!  Kevin
0
Samba1
10/29/2009 6:07:03 AM
mac.office.excel 1146 articles. 0 followers. Follow

3 Replies
1492 Views

Similar Articles

[PageSpeed] 53

> On 10/29/09 2:07 AM, in article 59b7f8f2.-1@webcrossing.caR9absDaxw, <br><br>> Yep! That is a long time bug. The worksheet change event does not fire when <br>
> a value is selected from a data validation list. You'll just have to live <br>
> with it until the next version of Excel. <br>
>  <br>
> --  <br>
> Bob Greenblatt [MVP], Macintosh <br>
> bobgreenblattATmsnDOTcom <br>
>  <br><br>Hi Bob - Thanks for the info!  Is this problem corrected with the new office? <br><br>Also - is there a function that would take care of this?  I've tried TODAY() and NOW() but both of these update the date as each day passes. <br><br>Thanks!
0
Samba1
10/30/2009 2:31:29 AM
> On 10/29/09 10:31 PM, in article 59b7f8f2.1@webcrossing.caR9absDaxw, <br>
> &quot;Samba1@officeformac.com&quot;  wrote: <br>
>  <br>
> &amp;gt;&amp;gt; On 10/29/09 2:07 AM, in article 59b7f8f2.-1@webcrossing.caR9absDaxw, <br>
> &amp;gt;  <br>
> &amp;gt;&amp;gt; Yep! That is a long time bug. The worksheet change event does not fire when <br>
> &amp;gt;&amp;gt; a value is selected from a data validation list. You'll just have to live <br>
> &amp;gt;&amp;gt; with it until the next version of Excel. <br>
> &amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt; -- <br>
> &amp;gt;&amp;gt; Bob Greenblatt [MVP], Macintosh <br>
> &amp;gt;&amp;gt; bobgreenblattATmsnDOTcom <br>
> &amp;gt;&amp;gt;  <br>
> &amp;gt;  <br>
> &amp;gt; Hi Bob - Thanks for the info! Is this problem corrected with the new office? <br>
> &amp;gt;  <br>
> &amp;gt; Also - is there a function that would take care of this? I've tried TODAY() <br>
> &amp;gt; and NOW() but both of these update the date as each day passes. <br>
> &amp;gt;  <br>
> &amp;gt; Thanks! <br>
> I have no idea about the new office. We'll all have to wait to see if it <br>
> gets fixed. Yes, today() and Now() get updated with each recalculation. That <br>
> is not the issue with data validation. The problem is that selecting an item <br>
> from a data validation list does not activate the worksheet changed event, <br>
> even though the worksheet does actually change. <br>
>  <br>
> --  <br>
> Bob Greenblatt [MVP], Macintosh <br>
> bobgreenblattATmsnDOTcom <br><br>I was thinking about Office 2008.  No feedback on this one? <br><br>Also, my thought was to forget about the macro and just use the function.  Is there a way to keep the date from recalculating?  No macro, just a function.
0
Samba1
10/30/2009 10:09:55 PM
I was reading some reviews for the &quot;student edition&quot; and it mentioned that the VBA was removed - I wasn't sure if that applied to the professional edition.  I can't believe that!  I just started learning it and now I feel like I'm wasting my time!   <br><br>I like the suggestion for the userform, but I typically don't use those because they don't have a &quot;natural&quot; look with the rest of the spreadsheet.  Maybe I'll do a custom dialog box that pops up when &quot;complete&quot; is selected. <br><br>Thanks for the help John! <br>
_____________________________________________ <br><br>> Excel 2008 has no VBA (and never will have) so whatever happens there is not <br>
> going to be useful to you :-) <br>
>  <br>
> I think you will need to use a macro that is fired by a userform, not a data <br>
> validation pull-down. <br>
>  <br>
> The issue is not the macro code, it's the fact that the trigger event does <br>
> not fire.  If you fire the macro with a userform drop-down list, your code <br>
> will run. <br>
>  <br>
> So you will need to add the validation to the macro code, instead of leaving <br>
> it to Excel's data validation. <br>
>  <br>
> If you re-write your code to check the output cell for a date first, then <br>
> you can code it to leave the date alone if it already exists.  If you need <br>
> to store the date every time, but not change it if the user selects <br>
> &quot;Complete&quot;, then you will need to store the completion date on a hidden <br>
> sheet. <br>
>  <br>
> Cheers <br>
>  <br>
>  <br>
> On 31/10/09 9:09 AM, in article 59b7f8f2.3@webcrossing.caR9absDaxw, <br>
> &quot;Samba1@officeformac.com&quot;  wrote: <br>
>  <br>
> &amp;gt;&amp;gt; On 10/29/09 10:31 PM, in article 59b7f8f2.1@webcrossing.caR9absDaxw, <br>
> &amp;gt;&amp;gt; &quot;Samba1@officeformac.com&quot; wrote: <br>
> &amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; On 10/29/09 2:07 AM, in article 59b7f8f2.-1@webcrossing.caR9absDaxw, <br>
> &amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; Yep! That is a long time bug. The worksheet change event does not fire when <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; a value is selected from a data validation list. You'll just have to live <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; with it until the next version of Excel. <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; -- <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; Bob Greenblatt [MVP], Macintosh <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt; bobgreenblattATmsnDOTcom <br>
> &amp;gt;&amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt; Hi Bob - Thanks for the info! Is this problem corrected with the new office? <br>
> &amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt; Also - is there a function that would take care of this? I've tried TODAY() <br>
> &amp;gt;&amp;gt;&amp;gt; and NOW() but both of these update the date as each day passes. <br>
> &amp;gt;&amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt;&amp;gt; Thanks! <br>
> &amp;gt;&amp;gt; I have no idea about the new office. We'll all have to wait to see if it <br>
> &amp;gt;&amp;gt; gets fixed. Yes, today() and Now() get updated with each recalculation. That <br>
> &amp;gt;&amp;gt; is not the issue with data validation. The problem is that selecting an item <br>
> &amp;gt;&amp;gt; from a data validation list does not activate the worksheet changed event, <br>
> &amp;gt;&amp;gt; even though the worksheet does actually change. <br>
> &amp;gt;&amp;gt;  <br>
> &amp;gt;&amp;gt; -- <br>
> &amp;gt;&amp;gt; Bob Greenblatt [MVP], Macintosh <br>
> &amp;gt;&amp;gt; bobgreenblattATmsnDOTcom <br>
> &amp;gt;  <br>
> &amp;gt; I was thinking about Office 2008. No feedback on this one? <br>
> &amp;gt;  <br>
> &amp;gt; Also, my thought was to forget about the macro and just use the function. Is <br>
> &amp;gt; there a way to keep the date from recalculating? No macro, just a function. <br>
>  <br>
>  <br>
>  --  <br>
>  <br>
> This email is my business email -- Please do not email me about forum <br>
> matters unless you intend to pay! <br>
>  <br>
> John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer, <br>
> McGhie Information Engineering Pty Ltd <br>
> Sydney, Australia. | Ph: +61 (0)4 1209 1410 <br>
> +61 4 1209 1410, mailto:john@mcghie.name <br>
>  <br>
>  <br>
>
0
Samba1
10/31/2009 6:57:49 AM
Reply:

Similar Artilces:

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Duplicate Data
One main form with two subforms (linked by ProjectID), first subform is for data entry, the second just allows the user to view what has been saved from the previous subform. The subform allows users to report on a month basis by selecting a month in a combo box [PeriodID]. I would like to add some code in the Befire Update event that checks the PeriodID for a match before it is saved. Can someone help me with the code please, I have tried various DLookup snippets of code from this site, but nothing is working as the code does not really suit my purpose. regards Maybe t...

Calling on a macro within a macro!
Hey All!! Quick Question - How do you call up a macro within a current macro? I have one big macro and I need it to jump to several other macros when it runs! Does it matter where the other macros are stored or is it better to have them all in one module? Help appreciated Thnx! Hi Mellowe, '=============>> Public Sub Main() 'Your code Call One 'your code End Sub '<<============= '=============>> Public Sub One() MsgBox "Hi from One" End Sub '<<============= > Does it matter where the other macros are stored or ...

CRM on Office 2003
Hi everyone, Currently MS CRM is not supported on Outlook 2003. After installing the software and starting Outlook you get an error "Microsoft CRM folders cannot be installed". I found that every time I close and open Outlook (after saying no to not disable the add-in), 1 more folder is added to the Microsoft CRM Folders. I did this about 13 times and it added all the folders required. After that I could see the toolbar and it looks like everything is working fine. Regards Shane Coetser lol thats persistence "Shane Coetser" <shanec@oakwell.co.za> wrote in m...

shortcut keys to macros
Hi, Is it at all possible to assign shortcut keys to macros in Outlook? Thx, Hans ...

retrieving data from a table on a website
There is a internet page with chemical data : http://spreadsheets.google.com/pub?key=twQ35hFIq-y0N84xQ5l0ICQ&output=html It has chemicals in the first column and proerties in adjacent columns. Is there a way to have a userform lookup a chemical in a textbox from the websites 1st column and then populate other textboxes with the adjacent data from the table? Can anyone help? Thanks, Roger On Jan 18, 9:59=A0am, Roger on Excel <RogeronEx...@discussions.microsoft.com> wrote: > There is a internet page with chemical data : > > http://spreadsheets.googl...

help Unable to record Macro !!!!!!!
I want to record a macro in excel.But as soon as I click record Macro it says "unable to record" macro. Got no help in excel help.I do this same thing in word and it's working. Please help It's urgent for me !!!1 Have a look here http://groups.google.com/groups?as_epq=unable%20to%20record&as_ugroup=microsoft.public.excel.* -- Don Guillett SalesAid Software donaldb@281.com "ash" <anonymous@discussions.microsoft.com> wrote in message news:3e0b01c42ae5$45333e00$a401280a@phx.gbl... > I want to record a macro in excel.But as soon as I click > record...

Data Text to Columns
I have a large column and would like to split it for the literal that says "Company Name" and then have the company name right next to it which is enterable. I tried using Data/Text to Columns, Fixed Width, sliding the arrow after Company Name: and it did not seem to split the column. I also tried putting an arrow out a ways so that there looked as though there were two defined fields and that didn't seem to work either. Am I approaching this the right way??? HELP!!! Thanks! Hi this is not possible in Excel. You have to use two columns for this -- Regards Frank Kabel Fr...

Drop down menu with validation that requires Marco
I try to create a form that contain two cells where cell 1 requires user to enter information like A or B or C. I am able to use drop down method for cell 1. However, the cell 2 require certain validation that relate to information that entered in cell 1. if User enter A in cell 1, then only the require information like A1, A2, & A3 shall appear in the drop down menu, likewise if user enters B or C. I have little knowledge on Excel, and only get to undertand the drop down method after asking around. I try to follow the online help on creating the Macro but fail to understand...

Macro that password protects a sheet
I am attempting to create a macro that can open a protected sheet, change something, and then protect it again. I continue to have an issue with the macro not entering the password. Is this possible to do/fix? Thanks, Ryan ..open password="mypassword" -- Don Guillett SalesAid Software donaldb@281.com "Ryan" <Ryan@discussions.microsoft.com> wrote in message news:D4780ED8-CA1D-4284-97BC-3576160D998E@microsoft.com... > I am attempting to create a macro that can open a protected sheet, change > something, and then protect it again. I continue to have an iss...

Footer Macro?
Hi Months ago I read a Public Sub Macro that read the selection of a drop down list in a combo box and placed it in the center Footer at the same time it also placed the date in the right Footer and tme in the left footer. I have searched most of the regular sites including this one and cannot find it anywhere --- Can anyone help with my search. Any help much appreciated Cheers ---- Mully ...

2007 search not working with Vista with new profile
It stopped working after I deleted my mail profile and started from scratch again. Who would have guessed doing that would break the search feature? I thought maybe it was indexing, but this is even after indexing has finished. Take any word from any subject line in any message and put that same word into the search box and it doesn't find the message. Using Vista with Outlook 2007 with Exchange 2003. Also the desktop search no longer looks inside my emails. Any ideas? Is there a cheat to make Outlook 2007 use the old simple search feature we love/hate from Outlook 2003 and befor...

Retrieving Data
I have a table on one worksheet with all my data on it. eg. 'Sheet 1' Date Details Fault RestoreTime I need to autmatically extract the data (records) matching a certai criteria on 'Sheet 2'. So basically filter the data on sheet1 by criteria set on sheet2 an get it copied to sheet2 automatically. Is this possible? Thanks Davi -- Message posted from http://www.ExcelForum.com Looks like Data/Filter/Advanced Filter will do just what you want. You put a criteria range into a range of cells consisting of fieldname with criteria below. Please see Exel Help under "...

Linest Poly Array using data horizontally
All of our metrics store data horizontally, meaning Months (x) are stored by column and data series (y) are stored in rows below the months... Mo: 1 -- 2 -- 3--4 -- 5 Data 31 -- 33 -- 36 -- 38 -- 39 When I apply any Order Poly Linest() array on the data set, I get errors. Tranpose the data vertically and the Linest() array works. Any advice? I expect you had something like =LINEST(B3:K3,B2:K2^{1,2}) but the comma between 1 and 2 is appropriate for vertical (columnar) data. For horizontal data (data in rows) you need a semicolon (I hope you are using an English version of XL!!) as in =...

xslt not working when xml has xmlns="urn" in root element.
Hello guys, I am new to XML and working on a XSLT to transforn yahoo shopping search result to html. my problem is the return XML contain xmlns in root element, here is the sample xml: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="aproductsearch.xslt"?> <ProductSearch xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:yahoo:aprods" xsi:schemaLocation="urn:yahoo:aprods http://api.shopping.yahoo.com/shoppingservice/v2/aproductsearch.xsd"> ................... <...

Keyboard Shortcut in Macro
Hi all i'v created macro with Keyboard Shortcut Ctrl+b . now i want to change it to Ctrl+z how can i do it . regards Tools-->Macro-->Macros. Select (don't open!) your macro, and hit the Options button. :) ************ Hope it helps! Anne Troy www.OfficeArticles.com "osaka78" <osaka78@discussions.microsoft.com> wrote in message news:1721A458-212D-4446-8209-494A459EE428@microsoft.com... > Hi all > i'v created macro with Keyboard Shortcut Ctrl+b . now i want to change it > to > Ctrl+z > how can i do it . > > regards THE MACRO IS NO...

Macros have been disabled but there is no macro
when I open a specific doc the info bar at the top says "Macros have been disabled", but when I hit Alt+F11 I can't find any VB or a module to remove. Why is it telling me about macros? Other docs don't give me this prompt. I thought I might have to enable macros to see the code. When I enabled macro, it said "do you want to save changes to this doc?" it flickered and came back as if immediately reopened. Any ideas? I could copy and paste the text into a new doc but I'd be interested to be able to strip off this problem. The doc is an internal IT ...