Hai,

I want to open an Excel sheet by using clicking command button
in form.This Excel sheet is stored in my local drive.

can any one help me to do this using VB6

RetVal = Shell(App.Path & "\abc.xls", 1)

insert the above code in click event of your command button.
where abc.xls is your excel file which is present in your application folder or you can enter respective path.
you must have Microsoft excel installed on your system.
you have to also include a reference "Microsoft scripting runtime (scrrun.dll)" in your project which is usually present in windows\system32 folder

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.