Is it Application.ScreenUpdating or Something Else ?

Farah

Board Regular
Joined
Oct 4, 2005
Messages
98
Hello,

I have a code, which send keys for Alt+F11, while it is doing so, it shows the Alt+F11 Screen. I do not want it to be shown, what exactly can i do to keep it on the Excel sheet and take the actions.

Regards,
Farah
 
TazGuy

I'm pretty sure the OP has already been to that link.

In fact I might have supplied it previously.

But after being given that link the OP came back with the problem of a protected VBA project.

There is nothing on Chip's site that deals with that, but I think somebody else suggested the SendKeys method to unprotect the VBA project.

I'm still waiting for an answer as to why the OP needs to delete the code.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
quote:
--------------------------------------------------------------------------------
In Excel 2002, you must have "Trust Access To Visual Basic Project" enabled. To enable this setting, go to the Tools menu in Excel, choose Macros, Security, then the "Trusted Sources" tab, and put a check next to "Trust Access To Visual Basic Project". Otherwise, you will get errors.
--------------------------------------------------------------------------------

Thank for your replies: :-D

Norie, deleting VB has a purpose, this is the project requirement to do so, & the project while being operated by users must also be protected. But users are authorized to "click a button" which will do certain actions along with deleting VB's for another purpose, which is a must for the project.

Wish i could explain it any better. :oops:

Taz, you are right, i was going to post another question for the sendkeys to check"Trust Access to Visual Basic Project". Do you think it is a good idea to do this ? I mean, All things work perfectly, the way i want it, but for users, if "Trust Access to Visual Baisic Project" is not checked, it gives error.

Can i please have the "Sendkeys" to check "Trust Access to Visual Basic PRoject" or this is not a very good idea ? :-?

Anyway, I have tried this, think something is not correct. :roll:

Code:
Sub Rectangle1_Click()

Application.SendKeys "%T"
Application.SendKeys "E"
Application.SendKeys "S", True
Application.SendKeys "^{PGDN}"
Application.SendKeys "{TAB}"
Application.SendKeys "{TAB}"
Application.SendKeys "{SPC}"

End Sub


Warm Regards,
Farah

P.S. I also look forward for some help on the main question. :huh:
 
Upvote 0
Hello Norie,

The button on which this code is placed says "Issue Report", which is used to issue a Report to the Client.

This button does certain actions (delete unwanted sheets, which are not part of the "Reporting sheets" & does the filtering parts etc. plus some other actions like deleting all buttons etc. from the "Reporting sheets", but still the Client can use Tools | Macro or Alt+F11 or maybe Alt|Shift+F11 etc. to access VB to see the codes (I know they can easily crack it :-( ) & i do not want the Client's copy to have any code to see what criteria we have set for discounts and pricing etc. Don't want to take any risk on sending them a copy having the codes.

Thank you once again...

Warm Regards,
Farah
 
Upvote 0
Gibbs said:
I am not 100% certain, but I think the send keys will cause automatically turn screenupdating back on.


Is there a way that while code is running, it remains on the Excel Screen as per the code i posted ? :)

Thank you.
Farah
 
Upvote 0
You need to develop software in which the data are separate from the code. Create an add-in. Start with http://www.mrexcel.com/board2/viewtopic.php?p=148963#148963

Farah said:
{snip} & i do not want the Client's copy to have any code to see what criteria we have set for discounts and pricing etc. Don't want to take any risk on sending them a copy having the codes.

Thank you once again...

Warm Regards,
Farah
 
Upvote 0
Farah

As Tusharm has suggested, and I think i have too in previous posts, you need to seperate the data from the code.

Either try Tusharm's add-in suggestion or consider just copying the data, and only the data, to a new workbook.
 
Upvote 0

Forum statistics

Threads
1,225,071
Messages
6,182,692
Members
453,132
Latest member
nsnodgrass73

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