The VBA is not working in my excel..please take a look..thank you.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
;)Sub OpenFolderRequest()
YesNo = MsgBox("Would you like to open the folder to see" _
& vbCr & "which files are currently there?", vbYesNo + vbQuestion, "Open Folder?")
Select Case YesNo
Case vbYes
myval = Shell("C:\Documents and Settings\pedie\Desktop\Startup c:winnt", 1)
Case vbNo
End Select
End Sub

http://www.mrexcel.com/forum/showthread.php?t=35008this code does not open up in my system. please help. thank you. I want to oepn up a folder from my excel
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
try this (just change the folder C:\My Documents to the one you want):


Code:
Sub OpenFolderRequest()
    YesNo = MsgBox("Would you like to open the folder to see" _
    & vbCr & "which files are currently there?", vbYesNo + vbQuestion, "Open Folder?")
    Select Case YesNo
    Case vbYes
    myval = Shell("C:\WINDOWS\explorer.EXE /e, C:\My Documents\", 1)
    Case vbNo
    End Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,531
Members
449,169
Latest member
mm424

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