EXCEL - VBA : Store scalar return value coming from Stored proc

Rahul Polaboina 181 Reputation points
2022-03-06T05:47:16.263+00:00

I have a stored proc with name "RunAll" in SQL Server which returns a scalar value with Column Name "Return Value" with either 0 or 1.

I need to Call the sp from excel VBA and store the return value in a variable and write an If condition if "ReturnValue" = 0 then Msgbox.show"success" else Msgbox.show "failure".

Need the Excel VBA code for the above requirement

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,720 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,689 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,601 questions
{count} votes