How can I cal " My Computer" through an Excel macro?

S

SAM SEBAIHI

I would like to call the forllowing windows through an Excel Macro to configure my
browser:

My computer
Tools
Option
File type
..I want to pick xls (through an excel macro)
..I want to uncheck ALL (through an excel macro)
All the above should be done in an Excel Macro automatically once the macro
is run

Thank you in advance.




--------------------------------------------------------------------------------

Sam Sebaihi
Faculty
Western International University
Associate Programs
[email protected]
[email protected] (alternate email)
Phone #: (405)315-8223 Time zone: Pacific Time
 
D

Dave Peterson

First, I don't know how to do this via a macro.

Second, if I wanted this done to my pc, I'd just do it manually.

Third, I wouldn't change these settings for anyone else without their
permission. And if I had their permission, I wouldn't use a macro--I'd just
give them the instructions that you wrote.

I don't think it's nice for my programs to change windows settings for others.
 
V

Vergel Adriano

Why must you do this via Excel? It would be easier if you use a registry
file.

1. Change the settings manually.
2. Open the registry editor (Start->Run->regedit)
3. The registry branch that you'll need to look at is
HKEY_CLASSES_ROOT\Excel.Sheet.8

Follow this link to find out how to make registry changes by using a .reg
file:
http://support.microsoft.com/kb/310516

By doing it this way, you make the purpose clear that you are changing
computer settings. If you distribute your .reg file to your users, it also
makes the purpose clear to them and they can decide wether they want to do it
manually or use your .reg file.
 
S

SAM SEBAIHI

Thank you so much Dave for your reply, the problem is that I developed a spread sheet to be loaded through a website, however, if this setting is not done, the spreadsheet macro will give you an error and it will not work. I wish there is a way??
Thank you,

--------------------------------------------------------------------------------


First, I don't know how to do this via a macro.

Second, if I wanted this done to my pc, I'd just do it manually.

Third, I wouldn't change these settings for anyone else without their
permission. And if I had their permission, I wouldn't use a macro--I'd just
give them the instructions that you wrote.

I don't think it's nice for my programs to change windows settings for others.
 
S

SAM SEBAIHI

Thank you so much Vergel for your reply, the problem is that I developed a spread sheet to be loaded through a website, however, if this setting is not done, the spreadsheet macro will give you an error and it will not work. I wish there is a way??
Thank you,


Why must you do this via Excel? It would be easier if you use a registry
file.

1. Change the settings manually.
2. Open the registry editor (Start->Run->regedit)
3. The registry branch that you'll need to look at is
HKEY_CLASSES_ROOT\Excel.Sheet.8

Follow this link to find out how to make registry changes by using a ..reg
file:
http://support.microsoft.com/kb/310516

By doing it this way, you make the purpose clear that you are changing
computer settings. If you distribute your .reg file to your users, it also
makes the purpose clear to them and they can decide wether they want to do it
manually or use your .reg file.
 
V

Vergel Adriano

Sam,

Perhaps what you can do is to trap the error in Excel. When you encounter
the error in Excel, pop a message box or a user form that tells the user that
the most likely cause for the error is that his/her computer settings need to
be modified. You then provide the step by step instructions for the user to
manually change the setting on his/her own.

If you still wish to change the setting automatically, the only way I know
is to update the registry. Follow this link to learn how to modify registry
settings using Windows API:

http://msdn2.microsoft.com/en-us/library/aa155731(office.10).aspx


IMO, I still think the easiest and best way is to simply tell the user how
to change the settings and not mess with the system settings with VBA.
 
S

SAM SEBAIHI

Thank you so much Vergel, I will try your suggestion. I do apreciate your
help.

====================


Sam,

Perhaps what you can do is to trap the error in Excel. When you encounter
the error in Excel, pop a message box or a user form that tells the user
that
the most likely cause for the error is that his/her computer settings need
to
be modified. You then provide the step by step instructions for the user to
manually change the setting on his/her own.

If you still wish to change the setting automatically, the only way I know
is to update the registry. Follow this link to learn how to modify registry
settings using Windows API:

http://msdn2.microsoft.com/en-us/library/aa155731(office.10).aspx


IMO, I still think the easiest and best way is to simply tell the user how
to change the settings and not mess with the system settings with VBA.
 
Top