![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The following code opens the control panel Public Function ShowControlPanel() As Boolean On Error Resume Next Shell "rundll32 shell32,Control_RunDLL", vbNormalFocus ShowControlPanel = Err.Number = 0 End Function This code from Lyle Fairfield opens up the datetime option in the control pannel Public Sub SetTime() ' should work from win 95/IE 4.0 inclusive onwards Dim s32 As Object Set s32 = CreateObject("Shell.Application") s32.settime ' I doubt if this next line is required Set s32 = Nothing End Sub I'm unsure how Lyle figured out executing the icon. How would one open a specific icon in the control panel? Ex: System. |
#3
| |||
| |||
|
|
http://babek.info/libertybasicfiles/.../nl137/cpl.htm |
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:u8mdnQU6qOIljAnRnZ2dnUVZ_tGdnZ2d (AT) earthlink (DOT) com... The following code opens the control panel Public Function ShowControlPanel() As Boolean On Error Resume Next Shell "rundll32 shell32,Control_RunDLL", vbNormalFocus ShowControlPanel = Err.Number = 0 End Function This code from Lyle Fairfield opens up the datetime option in the control pannel Public Sub SetTime() ' should work from win 95/IE 4.0 inclusive onwards Dim s32 As Object Set s32 = CreateObject("Shell.Application") s32.settime ' I doubt if this next line is required Set s32 = Nothing End Sub I'm unsure how Lyle figured out executing the icon. How would one open a specific icon in the control panel? Ex: System. |
#4
| |||
| |||
|
|
mbyerley wrote: http://babek.info/libertybasicfiles/.../nl137/cpl.htm Good site. Thanks. If I select Start/Run and enter in the dialog rundll32.exe shell32.dll Control_RunDLL timedate.cpl it works like a champ. Within Access (v2003), If I enter in the immediate window ? Shell("rundll32.exe shell32.dll Control_RunDLL timedate.cpl",,vbNormalFocus) it opens and closes. Nothing in the start bar. RunDLL is in the list of tasks in the TaskManager. |
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:u8mdnQU6qOIljAnRnZ2dnUVZ_tGdnZ2d (AT) earthlink (DOT) com... The following code opens the control panel Public Function ShowControlPanel() As Boolean On Error Resume Next Shell "rundll32 shell32,Control_RunDLL", vbNormalFocus ShowControlPanel = Err.Number = 0 End Function This code from Lyle Fairfield opens up the datetime option in the control pannel Public Sub SetTime() ' should work from win 95/IE 4.0 inclusive onwards Dim s32 As Object Set s32 = CreateObject("Shell.Application") s32.settime ' I doubt if this next line is required Set s32 = Nothing End Sub I'm unsure how Lyle figured out executing the icon. How would one open a specific icon in the control panel? Ex: System. |
#5
| |||
| |||
|
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:iqmdne-5evFOzgnRnZ2dnUVZ_gmdnZ2d (AT) earthlink (DOT) com... mbyerley wrote: http://babek.info/libertybasicfiles/.../nl137/cpl.htm Good site. Thanks. If I select Start/Run and enter in the dialog rundll32.exe shell32.dll Control_RunDLL timedate.cpl it works like a champ. Within Access (v2003), If I enter in the immediate window ? Shell("rundll32.exe shell32.dll Control_RunDLL timedate.cpl",,vbNormalFocus) it opens and closes. Nothing in the start bar. RunDLL is in the list of tasks in the TaskManager. dunno. Since Shell is just a VBA Wrapper for the ShellExecute API, I suspect there is not enough parameters passed for this particular applet. Just use the API directly as the following works as expected: 'declare at the module scope Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hWnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long then in your code: Dim i As Long i = ShellExecute(0, "open", "rundll32.exe", _ "shell32.dll Control_RunDLL timedate.cpl", "", vbNormalFocus) |
| "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:u8mdnQU6qOIljAnRnZ2dnUVZ_tGdnZ2d (AT) earthlink (DOT) com... The following code opens the control panel Public Function ShowControlPanel() As Boolean On Error Resume Next Shell "rundll32 shell32,Control_RunDLL", vbNormalFocus ShowControlPanel = Err.Number = 0 End Function This code from Lyle Fairfield opens up the datetime option in the control pannel Public Sub SetTime() ' should work from win 95/IE 4.0 inclusive onwards Dim s32 As Object Set s32 = CreateObject("Shell.Application") s32.settime ' I doubt if this next line is required Set s32 = Nothing End Sub I'm unsure how Lyle figured out executing the icon. How would one open a specific icon in the control panel? Ex: System. |
![]() |
| Thread Tools | |
| Display Modes | |
| |