Hi,
i have the following code in my excel objects
It seems to be making the copy and paste features not work anymore.Please Login or Register to view this content.
Do you see a work around for this?
Thanks,
Hi,
i have the following code in my excel objects
It seems to be making the copy and paste features not work anymore.Please Login or Register to view this content.
Do you see a work around for this?
Thanks,
Good afternoon hedge
This code is firing everytime a different cell is selected and in doing so it clears anything copied to the clipboard. Is it really necessary to use the Selection_Change event? You'd probably be better hanging it on the Worksheet_Change event instead, thus:
HTHPlease Login or Register to view this content.
DominicB
Please familiarise yourself with the rules before posting. You can find them here.
If I use that new code, when would a calculate be done?
My Main goal with the calculate code was that, I have function that I created in my VB code. When I change some of the values in the vb editor and then went back to my workbook, I didnt want to have to hit F9 to recalc.
This was the only way I was able to get that done.
Any ideas?
Thanks
Hi hedge
The recalc will be done every time you add something (anything) to the worksheet, as opposed to everytime you change the selected cell.
It is unlikely that anything would change in your workbook without you doing something.
Are you saying that you have a UDF in your workbook as well? If you would like to post the code it might be possible (depending on what it does) that someone may be able to suggest a way to make it fully volatile (update when a change occurs, and not need the code I suggested).
HTH
DominicB
Hi,
Code is enclosed
The problem is when I change one of the tiers or steps and then close the vb editor the cell with the formula doesn't update until I hit F9.Please Login or Register to view this content.
that is why I added this code
Then when I clicked back to the worksheet everything updated.Please Login or Register to view this content.
Thanks,
I would not expect the sheet to auto re calculate when you change the underlying code for a function. You would have to manually recalc.
Once the function is stable, in that you stop changing the code, then it should update when any of the cells it references change.
Other wise you will need to use the Volatile statement in the function.
thanks
I guess there rely isn't a solution to my problem
I will just have to disable to calculate code, and then hit f9 whenever I change the user defined function.
Thanks
Hi,
Do you think the -
could be used here?Please Login or Register to view this content.
how does excel activate a window?
Thanks,
You can acitvate a sheet by selecting it. If the sheet is already selected you will need to select another sheet first. But hey you already knew that as I answered your other post on exactly that topic.
I think you need to stop and think about your function and why it is that you need to keep changing it. If there are variable elements to your function perhaps those to should be information you pass to the function.
Sorry about the double post.
Yes, I guess I will have to change how the function is working.
The only problem I had when I added this code
is that the copy and paste feature was now disabled.Please Login or Register to view this content.
Is there anyway to manipulate the copy/paste feature or clipboard options with VB code?
Thanks again.
If you put the Tier and Step constants in the workbook and passed them to the function as Andy suggests, everything would recalculate automatically.
You're digging yourself into a deeper and deeper hole.
Entia non sunt multiplicanda sine necessitate
ok thanks for your help on this topic.
now the hard part - telling my Boss we need to revamp her workbook.
Thanks again
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks