Answer Questions
Juan T. Llibre Reading data dll into excel
I have recompiled a Visual Foxpro table into a DLL using VFP9. It is registered and VFP reads the DLL correctly. The DLL is just a table with code that performs a lookup based on two values and returns a value for use. In Excel, the following code is in a module: Declare Function spec_Field_Value_Function Lib "spec_search" (cThisSize As String, cThisValue As String) Public Function spec(Shape As String, Property As String) As Variant ...Show All
candie 13 Run-time error '3085' - Undefined Function in expression
I have an intermittent problem with an Access database. I have a function defined in a module shiftletter, which takes two parameters. This function is used by a query. Nine times out of ten the query called by VBA works. But occasionally I get the above error, to make the query work I have to reboot my machine. Opening and closing the database does not help. Running the same query in the query window works. I have tried moving the functio ...Show All
AmolB Help with using Outlook from Access
I am openning Outlook by calling createobject, which I expected to open a new instance of the application. However it appears to use the one open on my desktop. This means that my quit statement closes my e-mail. How should I amend the below to leave my original e-mail session open Also I will be replacing the debug.print statement with code to work with the attachment to copy data into my database. I am intending to save the file to a tempor ...Show All
sonali kedar Is an Excel bug that set PivotItem.Visible to true will generate 1004 Macro Error?
In a Excel PivotTable, I want to programically hide or show some PivotItems of a PivotField. To hide, it works fine (just set mPivotField.PivotItems("xxx").visible = False). However, to show, it does not work: mPivotField.PivotItems("xxx").visible = True. Program breaks with an error 1004, macro error. When try to record a macro for setting a non-visible PivotItem to visible, macros recorded is to use ...PivotItem("xxx").visi ...Show All
YOUR-Mark VLookup returns "Error 2042" when there is not match. How can I identify it pragrammaticaly?
Hello all, I am new to VB so my question probably sounds silly! I would like to use VLookup function but I cannot handle the return value when the function does not find the parameter. I get a "Error 2042". I dont know its actuall format. Is it only a string I tried to check it with the Aplication.IsNA() and IsEmpty() message but they don't work correctly. Do you know how can I solve this problem Per our ...Show All
John Layton Accessing Active Directory trough Access 2002
I need to build the security in one of the Microsoft access app based on Active directory.How can I assess Active Directory trough Access 2002. Thanks Marina Per the support engineer: I found a way to access the Active directory services through VB macros and I’ve included the details below. Active Directory can be accessed through Visual Basic macros. These macros can be written in Ac ...Show All
metallicaboy VBA Visio 2002 and OpenEx
Has anybody else experienced that the flag argument to the Documents.OpenEx method have no effect in Visio 2002 I try : Call Documents.OpenEx(FileName:=MyFileName, Flags:=vizOpenDontList + vizOpenMinimized) But I see that the Visio document opens maximized and it also appears in the history list. What am I doing wrong (I see that the Object Browser calls the argument Flags , while the help file calls it openFlags ) Thanks in adv ...Show All
Orcabelle InputBox() in MS Word form textbox.
I would like to insert a InputBox() prompt with the text being entered into protected Word form Textbox. I understand the InputBox() code and that the macro will be going into the ''Run Macro On Entry' dropdown box. Can someone point me in the right direction on how to do this. I am new to VBA. I am creating a MS Word form, like a memo ir fax sheet. I would like to have a popup occur upon opening the form, ask ...Show All
jp01uk Autosave using VBA after n minutes
Question: Using Excel 2002 SP2, I use VBA to drive a database of currently 15,000 records which automates a number of tasks such as letters, faxes, etc. Problem is, is that I don't know how to create an autosave function. I've integrated a save button instead but would like it to autosave after, say, 10 minutes. The only thing I can think of is to give the workbook shared access. I don't want to do that. Any assistance will be appreciated. Cheer ...Show All
Indinfer Excel VBA - Worksheet_Change problem?
Help please ... I have a SUB called "ValidateStopDate()" that I need run when Range("F2") changes. In my Worksheet_Change sub, I have: Private Sub Worksheet_Change(ByVal Target As Range) Dim KeyCells As Range ' The variable KeyCells contains the cells that will ' cause an alert when they are changed. Set KeyCells = Range("F2") If Not Applicatio ...Show All
Cringing Dragon Closeing shared files
Hello Yesterday I stack with a problem of opening and writing some information to file in AD domainm which was open by one user. I noticed that when someone open a file, then I can not do anything with it untill the time when he will close the file. My question is : Is it possible to close such session to the file for this user thru the vb.net or cscript code My program need to get full acceces to some files and I need to be sure that all ...Show All
Andreas Hammar Increase Speed of a Word Macro
I have written a macro in MS-Word for formatting of documents. It finds the carriage Return character and replaces it with Null. For a 60 page document the macro takes approx 1 hour to complete. I have tried following options 1. Increase Virtual Memory 2. Increase RAM from 512 Mb to 1024 Mb. 3. Turned Off Spell Check and Grammar Check. but nothing has helped. Can anyone please tell me how to increase the speed and decrease the execution time ...Show All
npvw Help with the application-defined or object defined error
I am fairly new to programming I have a command button 1 in the spreadsheet however I keep getting an error message application-defined or object defined error. I am not sure what this error means. What I want to do is set ninterval, rbedradius and xinterval to cell values shown below. I want to use a for loop and apply calculations. Later (not yet coded) want to put a condition on the third column of formulation. How d ...Show All
Dave_W email from excel
The code at the end allows me to send an email with outlook with some fields from an Excel spreadsheet. Note that in the body I copy a table in html format. Is there an easier way to include in the body a range of cells in table format Thanks, Antonio Sub send_email_confirm() Dim objMail As MailItem Set objOL = New Outlook.Application Set objMail = objOL.CreateItem(olMailItem) ' determines if sale or purchase Di ...Show All
Stephen Haberman 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
