help in vb codes (opening worksheets)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hima00
    New Member
    • Mar 2007
    • 1

    help in vb codes (opening worksheets)

    Hi all i am beginner in vb. could any one pls help me in vb code here. i want to open worksheet2 in worksheet1 by using vb code.

    here is my code
    Dim xlTmp As Excel.Applicati on

    Set xlTmp = New Excel.Applicati on
    xlTmp.Workbooks .Open "d:\Jiju-timesheet.xls"

    Dim xlSht As Excel.Worksheet

    xlSht = xlTmp.Worksheet s (error appear here saying the variable is not set)
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Hi. What happens if you do this?
    Code:
    Set xlSht = xlTmp.Worksheets

    Comment

    Working...