This is easy but I don't know how

Hi,

I activate Excel from VB6 like this :


Dim x

x = Shell("E:Microsoft officeOfficeEXCEL.EXE", vbNormalFocus)


This opens up Excel with the default of 3 sheets.

All I want to do is select sheet2 and cell B1.


Can anyone tell me how?

Thanks very much!

Albert




Comments

  • : Hi,

    : I activate Excel from VB6 like this :


    : Dim x

    : x = Shell("E:Microsoft officeOfficeEXCEL.EXE", vbNormalFocus)


    : This opens up Excel with the default of 3 sheets.

    : All I want to do is select sheet2 and cell B1.


    : Can anyone tell me how?

    : Thanks very much!

    : Albert


    I am not really sure about this, as it is not my forte, but I don't think you can automatically have a SHELL command do that for you. Instead, why don't you try writing a macro in Excel to select the correct worksheet/cell for you, and then try to figure out how to make it automatically exec when the program starts. Just a thought...




  • DDE:


    LinkTopic Excel|Sheet2

    LinkItem B1


  • : DDE:


    : LinkTopic Excel|Sheet2

    : LinkItem B1


    Thank you very much!!


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories