By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,101 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,101 IT Pros & Developers. It's quick & easy.

help in vb codes (opening worksheets)

P: 1
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.Application

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

Dim xlSht As Excel.Worksheet

xlSht = xlTmp.Worksheets (error appear here saying the variable is not set)
Mar 17 '07 #1
Share this Question
Share on Google+
1 Reply

P: 1,646
Hi. What happens if you do this?
Expand|Select|Wrap|Line Numbers
  1. Set xlSht = xlTmp.Worksheets 
Mar 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.