sometimes vba works sometimes not

cicada

Board Regular
Joined
Jan 10, 2010
Messages
79
hey everyone i am obviously doing something fundamentally though rudimentary wrong. Previously i entered code using visual basic and it ran beatifully and executed exactly as i wanted didnt save as it was a test run and reentered the same way (yes i am sure) and it does nothing. could someone give me a step by step on how to make the code run tried using help etc but cant find exactly what im looking. previously i didnt do anything just entered it and it started running. please help very frustrating. going backwards. thanks

Cicada
 
disregard the above message.

I just entered the data manually in J7 and got the pop up box "change event firing" I simulated case 6 and the figues in range j19:J22 went in range d3:D6 as desired. but it only works when i do this manually. as mentioned above the data in J7 is normally entered via an external source. Is there something i need to do. thanks again.
Cicada
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Does anyone have an answer to this. If the code is working when manually prompted but not otherwise what needs to be done to rectify this. I should remind you that normally J7 is filled with a comma delimited string that comes from an external source that updates every ten seconds or so. when running like this the code does not want to work. When i enter data in the column manually and the manually entered data satisfies the conditons set out in the code it works beautifully. So could anyone please advise on a way to fix this. thanks for your help.:confused:

Cicada
 
Upvote 0
You might need to use a Worksheet Calculate event rather than a Change one.

Dom
 
Upvote 0
hi domski,

From previous posts several other vba experienced members advised in my situation i needed event change, as in previous code i was using event calculate but they could not get it to run. If i used the above code just under event calculate and changed nothing else would it run, and in which module would i put it. Do have any ideas why as it exists under event change it only runs when manually prompted. thanks

cicada
 
Last edited:
Upvote 0
ah, i have read that event change procedures will not fire with data from a dde external link although some contend it is possible with versions 2000 onwards. So they suggest entering simple formula in adjacent column such as in k7 type = J7 and use calculate event procedure to run code. just about to try it out, will post for anyone with similar problem to say whether this solution worked. thankyou everyone for your input. will no doubt have more questions later. maybe one day i can contribute. thanks

cicada
 
Upvote 0
ok did not work!!! this has been driving me nuts cant get anything to happen. I have been working on this for ages. The problem is that it is working of an external dde link so when manually prompted works great if dde link feeds than it doesnt at all. that is for teh change procedure. the calculate procedure i cant get it to work. I have been reading about setlinkondata though it was a little scary for someone of my experience would this be a workaround to my problem that is would my change procedure fire through this. Please help. Yes i am begging. thanks

cicada
 
Upvote 0

Forum statistics

Threads
1,225,482
Messages
6,185,259
Members
453,283
Latest member
Shortm88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top