Answer Questions
Gagan Sharma help me
hi every body i want to know how to write the macros to access the data base form sql server using vba for excel .please help me You want to look into ADO. There is FAR to much to cover in a post but ADO but it's what your looking for. ADO are objects that let you communicate with a data source, including Access and SQL Server. To be honest your best buying a book on it. D. Sceppa - Programming ADO (MS Press) looks good. ...Show All
RickGaribay.NET Memory issue with variable declaration in a macro to write from excel to text file
I have a macro to write data from excel spreadsheet to text file. The macro is actually creating a DMS script with the insert statement. Everything works fine till the cell(i, 104). Beyond that I am getting 'Compile Error- Too many local, non static variables. ' When I look up in the help it says that 'The sum of the memory requirements for this procedure's local, nonstatic variables and compiler-generated temporary variables exceeds 32K'. Ho ...Show All
B?R?K?M MEKAN?K Collections Class For Each Next
I have created class modules in my Excel VBA project that each include a private collection object. I am trying to leverage the "house of bricks" model whereby the class will only add and return an instance of a specific object. My problem is that from the code module that creates the instance of the collection class I cannot use For Each...Next iteration to step through the collection. In VB6, I've used NewEnum to return an IUnknown a ...Show All
BeerBecks Number formatting
Hello, I have a program that inserts data into Excel via a form made in VBA... Everything works great, however, it inserts the data as Text and i need it inserted as currency. I tried creating a variable as currency and setting the range needed to be currency, however that did not work. I also tried creating a macro, however, that did not work. Does anyone have any suggestions as to what code i can use Thanks in advance. ...Show All
DenverQA Business Scorecard Manager 2005 database problem
Hi, I’m having a problem with my Business Scorecard Manager 2005. It’s installed, but it doesn’t make a connection with the database (SQL 2005 Enterprise). Even with the templates that it already has, the connections that he tries to make are to tables that do not exist. If i try to create a connection string to an existing database, it also gives me an error. How can i solve this Thanks As I understand it, the t ...Show All
anku Access Form "INSERT INTO" not working
Let me preface this by first of all saying I haven't done much VB in several years. However, the current project I'm working on at work I'm having to create an application in Access using VBA. It's just a prototype so that management can see that the process will work, but I'm having trouble with one section. Essentially I have a form with one text box on it that when the user clicks the button it will add whatever the user typed in along with a ...Show All
Laiz Excel: Treeview handle events for dynamically added control
How do I handle events for a TreeView control dynamically added to an Excel 2000 worksheet I am trying the following approach, but get a 'Type Mismatch' error because my wrapper class, clsTreeView, is expecting an MSComctlLib.TreeView; while the object is created from the MSComctlLib.TreeView class type Dim oOLE As OLEObject Set oOLE = Sheet1.OLEObjects.Add(ClassType:="MSComctlLib.TreeCtrl.2", _ Left:=250, Top:=500, Width:=132 ...Show All
Anitha51560 Help required.....
Can someone help me please I am trying to create a VBA User form to open up individual Spreadsheets rather than having to have all the sheets open (as with a workspace). I have designed the user form and now need to code the command_buttons. However I am stuck with what code I need to use. If it helps, I need to program 7 buttons, 6 will open spreadsheets and one will open a MS Project file. This is fairly urgent as I have to have ready ...Show All
charles springwood Output property to save as
Hi people, I've been trying to generate a result from a MSXML used with Excel. When I apply the output property sampled below, it shows me a HTML into the message. Now I'm trying to display it right to a sheet or save it in a format xls, no results. Would anyone show me a way Else Set xslProc = xslt.createProcessor() xslProc.input = xmlDoc xslProc.transform MsgBox xslProc.output end if Marcos Hercules ...Show All
koknc Openning Excel from Access 97
Can anyone suggest a useful article / reference book which details how to open and close Excel worksheets from Access 97. I have copied some code from the help text into my database, but I have two probblems. One I don't really understand what the code does, and I would like to understand what is happenning. Two, the code checks if Excel is running, if not it opens it, then (with my worksheet name included) it opens the file I require; but if ...Show All
dirose Exporting a table from an Access File to another Access file
Hi, Im trying to export a particular table from an Access file using VBA to another Access file. Help please. PSD actually, that's what the support engineer just suggested. :-) thanks for jumping in! here's some additonal info: We can use transfedatabase to do it. TransferDatabase Method [Access 2003 VBA Language http://msdn.microsoft.com/library/en-us/vbaac11/html/acmthactTransferDatab ...Show All
urubin VBA runs slowly in Excel 97
I have a module attached to a button in Excel. The module deletes a number of cells, reads some data stored in a list on a separate sheet and writes some data back to the area deleted, based on criteria in some cells. First time I run it, it runs in seconds. If I run it again it takes minutes. Any ideas That all I can suggest. Does the recorded macro with the xlManual setting run ok I'm thinking it m ...Show All
Toan Print folder files to a file
Hi all, I am trying to print a folder files and sub-directories to a xls or csv or txt file. I know i can do it through the Command Prompt, like that: c:\>dir /s >"File List.csv" This code under command prompt, will print all the files and sub directories and thier files of c: to the file: "File List.csv". i want to do the same from VBA, through excel, or stright through VB exe file. pls advise Than ...Show All
Nick Foster Custom Date Picker Control
I am developing a form for entering data into Excel and for some of the fields have dates as values. I really like the built-in date and time picker control for this, except that I want to be able to change the background colour of the part of the control that looks like a combo box. And that is simply not possible with the standard date and time picker. How can I get around this problem I have been trying to create a custom control to ...Show All
Tweed export lots of Access stored queries
Hello, I've got about 100 stored queries in an Access database. I'd like to export them each to text files with a VBA macro for source control. Any ideas If anybody could clue me into what VB object contains the export method for stored access queries, I would appreciate it. Thanks. jrock2468 wrote: Hello, I've got about 100 stored queries in an Access database. I'd like to export them each ...Show All
