Visual Basic 6 in Windows 7

Visual Basic 6.0 Gets Run time Error '70' Permission Denied in Windows Vista and Windows 7

Visual Basic 6 programming is still supported by Microsoft Corporation until the latest Operating System which is Windows 7. However, there are some functions in Visual Basic 6 that Windows Vista or Windows 7 does not allow to execute the command like for example the "SendKeys" it will got an error "Run-tine error '70': Permission denied". Please check the sample visual basic 6.0 code below.

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then SendKeys "{tab}" '13 = Enter Key
End Sub

I've tried to research at the google about this problem but I found nothing. Through my experiment I found a solution that will work 100% based on my own project, I uploaded also a short video to as a demonstration. Youtube link is

Please follow the steps below to avoid getting Run time error '70' permission denied in Windows Vista and Windows 7.

1. Select the executable files you want to run and then click the right button of the mouse and select 'Properties' menu. Please see the image below.

2. Click the 'Compatibility' Tab. Please see image properties below.

3. In Compatibility Mode, select checkbox 'Run this program in compatibility mode for:'

4. Select the 'Windows XP (Service Pack 2)' and then click the OK button to save changes. 

5. Done! Please try to run your executable file and hope it will help solve your problem.


Anonymous said...

visual basic 6.0 download only 47 mb

Anonymous said...

If the executable file resides on a server (ie is used in a multiuser environment) you cannot use the compatibility mode, as you describe, as they are greyed out. Any thoughts?

html5 player said...

I have no words for this great post such a awe-some information i got gathered. Thanks to Author.

Computer Networking Courses in Noida said...

Your Sharing is enjoyful to me, i got some help from your posting.

Anonymous said...

my software is compatible with windows 7 except a single commant that is dataenviroment1.command_grouping where as dataenvironment1.command works well. can u help me

Unknown said...

Imaging for Windows XP Imaging is a neat program which first came out with Win95 as ... to be bundled with Windows so it disappeared from Windows XP which is a shame as it ... Imaging is a great program for something very specific which is to scan, view, edit, ... Run the install.bat file and it will do the entire installation automatically.

Unknown said...

Attribute VB_Name = "Module1"
Public xyCoord(500, 6)
Public gintXScroll As Long, gintYScroll As Long ' seting the x and y scroll position
Public gintCurFieldPosition As Integer ' seting the position for image

-on form level
ImgEdit1.Image = Dir1.Path & "\" & File1.FileName

Private Sub File1_Click()
Text1.Text = Dir1.Path & "\" & File1.FileName
lblcount.Caption = Trim(File1.ListCount)
lblbatchNo.Caption = File1.ListIndex + 1
lblbatch.Caption = File1.FileName

ImgEdit1.Image = Dir1.Path & "\" & File1.FileName

'Image1.Picture = LoadPicture("")
'Set Image1.Picture = Nothing
'Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)

'Picture1.Picture = LoadPicture("")
'Set Picture1.Picture = Nothing
'Picture1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)

End Sub

Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

Private Sub UpDown1_Change()
UpDown1.Min = 10
UpDown1.Max = 150
ImgEdit1.Zoom = Val(txtZoom.text)
End Sub

Private Sub UpDown1_DownClick()
If ImgEdit1.Zoom <= 10 Then Exit Sub
ImgEdit1.Zoom = ImgEdit1.Zoom - 10
gintXScroll = (xyCoord(gintCurFieldPosition, 0) * 0.4) 'right
gintYScroll = (xyCoord(gintCurFieldPosition, 1) / 27) 'right

ImgEdit1.ScrollImage 3, gintXScroll 'left
ImgEdit1.ScrollImage 1, gintYScroll 'up
txtZoom.Text = ImgEdit1.Zoom
Exit Sub

End Sub

Private Sub UpDown1_UpClick()
If ImgEdit1.Zoom >= 150 Then Exit Sub

ImgEdit1.Zoom = ImgEdit1.Zoom + 10
gintXScroll = (xyCoord(gintCurFieldPosition, 0) * 0.4) 'right
gintYScroll = (xyCoord(gintCurFieldPosition, 1) / 27) 'right

ImgEdit1.ScrollImage 2, gintXScroll 'right
ImgEdit1.ScrollImage 0, gintYScroll 'down
txtZoom.Text = ImgEdit1.Zoom
End Sub

Anonymous said...

i want to help,
sub:- finding data
using 2.text box, 3.command button
i create a program 3 textbox (a.student name b.address)3 command button (a. save b. new c. delete) now i want to that i type any name in 3rd textbox and data will show in 1st and 2nd textbox. how it possible. please tell me sir.

Anonymous said...

Thank you so much for this helpful post! I'm running Windows 7 with Visual Basic 6.0 (which I now realize has compatibility issues) I was trying to use SavePicture (Picture1.Image, "Pic.bmp") to simply save an image from my PictureBox onto the hard drive. When I run the program I got no error messages but when I go look on my hard drive there is no "Pic.bmp"! So after scratching my head and googling for an hour or so I finally found the answer here! I had to make my Visual Basic .exe "compatible with Windows XP" and now it works! Thanks!

Cris Leonard Jaime said...


promovarguez said...

I have Windows 8 with visual basic 6 and the problem persists. compatibility with Windows XP Service Pack 2. sendkeys continuous mistake. any suggestions?

padmakar said...

If the same is happening in Excel - do you mean to say that you have to open Microsoft Excel executable file??

Ambie James Nicolas said...

same here windows 8 sucks..

prem369 said...
This comment has been removed by the author.
prem369 said...

I am crying with this ,UAC is turned off, and i give all shit admin privileges to VB6,
I am using windows 8 :(

Ani Intrnationl said...

hey thnkx for dis awsm blog

its really fab and help me tooo much for mine further works

Tony said...

Aditionally, Set the value EnableLUA in the registry ( HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ) to 0. But this disabled the new store apps.

savitha singh said...

I tried to install visual studio in my windows 7 system, it shown compatibility errors. I tried your tips on changing compatibility mode, its working great for me. Best DOT NET Training institute in Chennai

Sten said...

There is an installer to simplify the installation of the VB6 programming IDE on Windows 7, 8 and 10 which has now had over 25,000 downloads.

VBA programming continues in Office and VB6 programming continues in Windows

Sten said...

There are guides to installing the VB6 programming language on Windows 7, 8 and 10

For Windows 7 (over 396,000 views) the guide is here:

VBA programming continues in Office and VB6 programming continues in Windows

Anonymous said...

this worked senkeys works in vb5 win 8.1-----from Tony Aditionally, Set the value EnableLUA in the registry ( HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ) to 0. But this disabled the new store apps.

Andria BZ said...

Thanks for sharing your view to our knowledge’s, its helps me plenty keep sharing…
DOT NET Training in Chennai

rebeka christy said...

Dot Net Training

Thanks for your wonderful post.It is really very helpful for us and I have gathered some important information from this blog.If anyone wants to get Dot Net Training in Chennai reach FITA, rated as No.1 Dot Net Training Institutes in Chennai.

Dot Net Training Chennai

jack wilson said...

Hi, I have read your blog. Your information is really useful for me.Thanks for sharing this blog. I did QTP Training Chennai at Fita training and placement academy which offer best Selenium Training Chennai with years of experienced professionals. This is really useful for me to make a bright career.


Software Testing Training in Chennai

dhanamlakshmi palu said...

Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
PHP Training in chennai | PHP Training chennai | PHP course in chennai | PHP course chennai

Shehroz Javed said...

Really Nice Information,Thank You Very Much For Sharing.Web Designing Company

Mike Holmes said...

This does not work in Windows 10.

To make it work in Vista I had to turn off User Account Control, unfortunately Windows 10 is different.

Bay Max said...

Awesome blog.Thanks for sharing your ideas to our vision. DOT NET Training in chennai is really useful to get a good job.Training will be provided by experienced professionals.

Post a Comment

Powered by Blogger