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,
If i want to get a variable from a stored procedure in sql and place that variable in cell A1, what is the code in Vb Script to do that?

So if the variable name is called Case_ID in my SQL stored procedure and i want to place it in cell A1, how do i iopen the stored procedure then call for the variable case_Id and aassign it to that cell?

thanks
 
Soultion,


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 = case_id

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top