TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anand Bohra
NA
233
0
Select Sheet in VB dot net
May 26 2010 10:51 AM
Hi,
I am creating a excel file using VB Dot Net to fetch data from SQL.
It works well & code is 100% complete
the only problem is how to give reference to excel sheet using its name property rather than displayed name
like I am using Globals.Thisworkbook.Sheets("Database")
now my requirement is what if user changed the sheet name from Database to say DB or whatever. My code fails
I tried lot to give reference to sheet number programatically but all in vain
In VBA I used to give reference like Sheet1.select instead of Sheets("Database").select so that my code run irrespective of sheet name.
Kindly suggest me the same way in VB DOT NET
I tried Globals.thisworkbook.sheets(1)
Globals.thisworkbook.worksheets.item(1)
but all fails even if user change sheet positions.
Pl . Pl. help me its urgent
Reply
Answers (
3
)
MAPI Controls
Problem in exporting grid view to excel file