Answer Questions
DanglingChap DLookup help?
Hi there - im building a contact management system and require some help. I have previously had help with VBA in terms of defining what users can and cant do within the system when logging in via a username and password which was incredibly useful. Im now at further along the route and now want to incorporate an activity system that will record all hours that employees will have worked against clients. However we have a lot of clients! The users login name('login_name' which is held in 'tblusers') is also entered into a 'leadofficer' field in 'tblcompany' so that we know which user is responsible for managing that client - this is done through a combo box on the company entry form so it looks up the values from the table 'tblusers'. On th ...Show All
furmangg Place a CR in normal Text Box via vba
I am trying to place CRs in a normal Excel text box via vba in an initialization routine. Here is the code I am using: Option Explicit Dim iLines As Integer Dim iCount As Integer Private Const SCG1 As String = "Line 1" Private Const SCG2 As String = "Line 2" Private Const SCG3 As String = "Line 3" later in code I have the statement: ActiveSheet.DrawingObjects("Text Box 2").Text = SCG1 & Chr(13) & SCG2 & Chr(13) & SCG3 However, the Chr(13) does not appear as a CR, but instead as a square character. The text does wrap at the margins of the text box. I have also tried using vbnewline instead of chr(13) with the same results. How can I get a real CR into the normal Excel text box ...Show All
mustangBE Allowing the user to pick a cell in excel
Hi, I would like to allow the user of my program to choose which cell that should be the starting cell for my program. How can I do this with a macro. This is how the code should work: It searches the worksheet for a specific text-string(This part have I fixed). If it fails to find that cell I want a pop up window to be visible where the user is asked to point out which cell that should be used as starting cell. The, by the user selected cell address should then be assign to a variable inside the code. Anyone that knows how to do this \Jonas Thanks again Derek! It works just perfect. Thanks Derek! It solved one of my issues. However one is left and that is. I would need to find which row and column the picked ...Show All
ea1 Sort rows within a range
Hi My problem is the following. I have a (100rows x 10columns) range to which some numerical output is written. I need to access each row in this range and sort it descending. Any suggestions Any help is much appreciated. Thanks. Thomas Hi Joe Yes, you are right, that is precisely what I need to do. Hi Andy Thanks. Very good comments - just what I was thinking about. Right now I am relying on the Help Function and the Internet to learn about VBA coding. Any ideas for literature references I am a student of finance, so my needs are mostly related to management of data files and calculations. Thanks! Best, Thomas Hi a ...Show All
Hamed_1983 OpenRecordset VBA Parameters
What are the parameters for db.OpenRecordset I take it you are referring to the DAO's (Data Access Objects) OpenRecordSet Method. See below for the parameters. You can also view the DAO help file complete with method call syntax and examples in either 1 of your local folders (depending on what version of DAO / Office you have installed.). Location 1 : C:\Program Files\Common Files\Microsoft Shared\Office10\1033\DAO360.CHM Location 2: C:\Program Files\Common Files\Microsoft Shared\DAO\DAO35.HLP OpenRecordset Method Creates a new Recordset object and appends it to the Recordsets collection. Syntax For Connection and Database objects: Set recordset ...Show All
Raihan Iqbal Strange Outlook 2007 POP3 Behavior & Slowness
Outlook 2007 is sending "AUTH "<crlf> as the first command to POP3 servers. This confuses the server and on some, causes a 3 second delay! Thus: 2007.01.02 13:04:47 POP3 (mira.net): Connected to host 2007.01.02 13:04:47 POP3 (mira.net): +OK POP3 Ready mailproxy2 0001bff0 2007.01.02 13:04:47 POP3 (mira.net): Authorizing 2007.01.02 13:04:47 POP3 (mira.net): [tx] AUTH ** note 3 seconds later ** 2007.01.02 13:04:50 POP3 (mira.net): -ERR Mate, the command must be one of CAPA, USER, PASS or QUIT Only Outlook 2007 does this. OL 2003 / OL Express / Windows Mail (Vista & Longhorn Server) all send "USER" which is correct. So why is OL 2007 sending "AUTH " Most POP3 servers "out there" choke on this command. Som ...Show All
EagleBeek Error on Archive Acivation
Hello, i tried to install LCS 2005 Standard on my Virtual Server (VMWare ;o) Sorry) and i have an error during the activation of the archiving service. I'm on a Windows 2003 Server Standard, all updates installed. There's only this server, it have all rules et AD is installed. I follow the instructions in LCS_2005_Deploy_SE.doc, i made this: 1) Installation of LCS files 2) Activation without MSMQ (MSSQL ) 3) Installation of MSSDE, i can see in Services MSSQL$RTC started 4) I never find MS03-031 patch 5) Activation of archiving service :: Error 0xC3EC783D I restarted the server but same error. So i decided to make different: 1) Installation of LCS files 2) Installation of MSSDE, i can see in Services MSSQL$RTC started 3) MS03-031 patch in ...Show All
AlexBB VB MACRO IN SHARED WORKBOOK(EXCEL)
HI, PLEASE UPDATE ME HOW TO RUN VB MACROS IN SHARED EXCEL WORK BOOK THANKS, Aravinda Hi, You cannot share a workbook, well you can but only one user will have write access to the data. If it's just code/forms your looking to share so that more than one user can run the code against their own set of data then your looking to create an addin (xla file). To share the addin you need to place it on a network share. There is an option in Excel, I believe it prompts you, when installing an addin to specify whether the addin should be copied to the local machine or kept in the share, if you keep the addin on the share then all users share the code and any changes to the addin are reflected for all users using it. ...Show All
GLutz78 [ACCESS] How to create menu silimar the attached photo
How to use vba to create menu when click the button from form in MS Access Hello Perry, I did this for a bit of fun and hopefully will help you too. I did this in Excel as I do not have Access at home. I'm sure the basics are the same. Create Userform1 with CommandButton1 Write this in the form code module [Form Module Code Start] Private Sub CommandButton1_Click() CommandBars("MyShortCut").ShowPopup End Sub Private Sub UserForm_Initialize() Call DeleteShortcut ' if "MyShortcut" popup exists then delete it Call createShortcut ' add MyShortcut popup End Sub [Form Module Code End] Write this in the Module1 Code Module [Module1 Code Start] Sub createShor ...Show All
feby sum if in list
Hi! I write in Excel, not VBA. I have a long list with bank names and depost values. The list of banks is sorted based on bank names. One bank can occur several times in the list (but since it is sorted they come after each other). I want to have the sum of deposit values for every bank. this works fine except when a bank has only one occurence. Example: Citigroup 100 Citigroup 120 Citigroup 200 Rabobank 130 Abn 200 Abn 150 My formula gives me this: Cititgroup 100 Cititgroup 120 Cititgroup 200 420 Rabobank 130 420 ABN 200 ABN 150 350 etc. My formula is: =if(A4<>A3;sumif(A:A;A2;B:B);""). please help me fix the formula so that it works fine even for banks with just onc ...Show All
John123 How to compare and control in VBA two numeric TextBoxes fields
Hi, I’m developing a form in Visual Basic Access (I use Access 2003). In the form I have two TextBox controls (lets call them txt1 and txt2) in which the user must insert integer values. The integer value in txt1 must be >= than the integer value in txt2. If the user doesn’t respect this rule, I would like that a warning message appeared and the focus returned to the last TextBox written (so the user can correct it). I have tried to set the ValidationRule property of each TextBox in the Properties window of the form: For txt1 I have set it to “>=[txt2].[Text]” For txt2 I have set it to “<=[txt1].[Text]” (the “[“ and “]” parenthesis have been added automatically by Access) In this way it doe ...Show All
Kalho Naaho error creating Excel application object
Hello World, I am using VBA from an application call MicroStation to open a document in Excel and am having problems creating the Excel Application object. The line: Set xlApp = GetObject(, "Excel.Application") results in the message Run-time Error '429': ActiveX component can't create object. The documentation indicates a number of possible problems, but none of them seem likely causes. Excel is installed on this machine with a valid license and I'm able to run it. It's registered, and isn't already opened. Any ideas what I'm missing Thanks, Stephanie Hi, The code example you posted is correct and works for me. But I can generate the error if I mis-spell the class descript ...Show All
BearerOfLoss How to pop data from a table in MS Access 2003?
why does the next statement result in an error message MsgBox Application.CurrentData.AllTables(tblECG).Properties.Item(1).Value The Error: " The expression you entered refers to an object that is closed or doesn't exist'. error number: 2467 any other suggestions to get a specified value from a table Hi What are you trying to read form the table, data or one of its properties Hi, Could this be because you missed the quotes around the table name MsgBox Application.CurrentData.AllTables("tblECG").Properties.Item(1).Value ...Show All
CrashPlaxton Can't change SourceFullName for linked object in PowerPoint
Hello to all, I need to change the linked info of about 400 items, because file names changed because the phrase "- Data -" had to be removed. Here's my code: Dim loSlide As PowerPoint.Slide Dim loShape As PowerPoint.Shape Dim sName As String '/ Loop through all shapes and find the linked ones For Each loSlide In ActivePresentation.Slides For Each loShape In loSlide.Shapes If loShape.Type = msoLinkedOLEObject Then ‘/ the next line prints the bad name Debug.Print loShape.LinkFormat.SourceFullName ‘/ the next two lines remove the extra text ‘/ and print the corrected name sName = Replace(loShape.LinkFormat.SourceFullName, &quo ...Show All
ivanchain Getting Data of HTML page
Hi everyone, Please help me out reading a certain html page and import the details to an excel sheet... Is it also possible for me to pass on a value to an html Thanks, music_at_ulan Can you please post sample code for me thanks. Hi Did you try CreateObject("MSXML2.XMLHTTP") You can open an url with open function and retrieve its contents ...Show All
