Any ideas why this isn't working?
Thanks!Please Login or Register to view this content.
Any ideas why this isn't working?
Thanks!Please Login or Register to view this content.
you need to provide more information.
where is the code?
assuming event code is actually trigger is the target cell O1 ?
what are the 2 routines suppose to do? do they run or error?
Is the code in the correct place?
What happens with the code when it runs? Add a message box to that code to see if it's running.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I'm not sure if it's in the correct place. It's at the very top of the module with the 2 subs that it calls below it, and a further few functions below them. Is that right?
The 2 subs it calls, Main and HourlyRate, just manipulate data on the sheet that the cell O1 is on.
I've put an MsgBox in and it doesn't show when I change the value of Cell O1
goto the sheet this event code is suppose to work on.
right click the sheet tab and pick View Code.
Does that sheet object contain the code?
If the code is in a standard code module then it will not run.
To expand on Andy's suggestion
Worksheet event code is stored on a worksheet module. To add it to your worksheet, do the following:
Copy the code
Select the worksheet in which you the code to run
Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
Where the cursor is flashing, choose Edit | Paste
Ok that's running now, I included in the code a MsgBox to see it's firing and it is.
However! How do I make it run code that is contained in the module?
What code in which module? Attach the workbook
That be a picture not a workbook. You sure are making it hard for us to help you
Ok I don't really want to post the entire work book up as it has a lot of info about what I earn + things like bank details.
I've got it to work now anyways.
Well you only needed to post a workbook with the code that did not work, no personal data needed.
Anyway glad you sorted.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks