Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Script for Excel

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I have to create some VB script that, from data retreived from a stored procdure in sql, creates an Excel document in the following form

Names A-B(in bold) Address(In bold)

Blah 53 Blah street

NAmes B-C (in bold) Address (In bold)

Blah 53 Blah strett

As i am a beginner in writing Vb Script - could anyone send me some script to get me started?

thanks
 

Set objXL = WScript.CreateObject("EXCEL.application")
objXL.Visible = True
objXL.WorkBooks.Add

Set wks = objXL.Worksheets
wks.add.Name = "Project"

Set Actv = objXL.Worksheets("Project")
Actv.Range("A1").Value = Name
Actv.Range("B1").Value = Address

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top