Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
We have an ASP.NET project that spits out an Excel form for each user
based on their username. It's not secure data, their username just limits it to the data relevant to them. They do so much manipulation with it that they needed a spreadsheet, hence why it's not in HTML form output. The catch is, there's a field that the users want to be able to update, unique to themselves. The solution we came up with for this is to populate a separate table on MS SQL Server that holds their username, a unique identifier off the spreadsheet, and the comment. Obviously, no problem putting this in the generated spreadsheet at the server level, but we're at a loss as to how to get it back up. The plan was to use a macro to "DELETE FROM Comments WHERE username = inputboxresult" and then loop through the fields with "INSERT INTO Comments (username, uid, comment) VALUES (inputboxresult, $B#, $AZ#)". Of course, then we realized neither of us knew how to run SQL commands in Excel VBA, and Google results have been less than helpful so far. The macros are being placed on the machines by hand, since they include a lot of individual customizations. (I know, I know...) The upshot of this is, if we need to distribute a File DSN with this, we can. I would prefer ADO, but I've not seen any VBA code that hinted at that working. Can someone give me a good resource or some sample code for running SQL commands in our Excel macro? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
background commands running in Excel? | Excel Discussion (Misc queries) | |||
running two separate commands in same Shell | Excel Programming | |||
running commands from hte shell | Excel Programming | |||
Running Unix commands from within Excel VBA | Excel Programming | |||
running windows system commands in VBA | Excel Programming |