Answer Questions
ChrisHelt String Functions
Does anyone know if there's a string function that removes new lines from a string (where return has been hit to start a new paragraph) It's kind of like the Trim functions I'm looking for, but these only work with trailing spaces, not where a new line has been started. Cheers! Keith Your right. I didn't pay attention to on what forum it was:) Hey man, Try the Replace() function. Just replace all the vbCrLf in the string with "" and that will remove them. nae bother big yin. :) Hi Keith Below example is one option to remove carriage returns (replacing with a space). Just change it to a function and pass your string to it as a para ...Show All
Daticus common dialog not returning file names.
Hi everyone. i have a vb script that is imbeded in an html page (hta). when i use the common dialog flags = cdlOFNAllowMultiselect the file list is present in the filename object and are separated by a space. however when i use dialog flags = cdlOFNAllowMultiselect Or cdlOFNExplorer the files that i selected on the dialog box, are not present in the filename object. the only thing that's there, is the path to the files. here's the code: Const cdlOFNAllowMultiselect = 512 Const cdlOFNExplorer = 524288 Set ObjFSO = CreateObject("UserAccounts.CommonDialog") ObjFSO.Filter = "All Files|*.*" ObjFSO.FilterIndex = 1 ObjFSO.InitialDir = "c:\" ObjFSO.Flags = cdlOFNAllowMultiselect or cdlOFNE ...Show All
johndoecal Using VBA macro to locate next free column on worksheet
I need a macro that locates the next free column (i.e. has no data in cells) and then places the cursor in a cell on a designated row. Would like search to start from column B and to place the cursor on row 4 on the free column. <> My VBA code thus far: Function NewColNumber(Range1 As Range) As Integer Dim j As Integer For j = 1 To Range1.Columns.Count If Range1.Columns(j) = "" Then NewColNumber = Range1.Columns(j).Column Exit Function End If Next End Function Sub SaveCOLComments() On Error GoTo Err_Part Dim Range1 As Range Dim intNewColNumber As Integer ' ...Show All
ming_68 Trouble while dealing with Share Point Object Model
Hello everybody, I am getting some trouble around SharePoint Object model. I was intended to write a console or windows application that will connect two SharePoint site (One is SharePoint 2003 and the other is SharePoint 2007) and will move/copy documents from one to another. I have tried to connect to the SharePoint 2007 first and it was connecting fine. (I was running my application into the same machine where the SharePoint 2007 is installed). The application was retrieving the Document from the SharePoint 2007 as expected but the trouble raised when it was trying to connect with the SharePoint 2003. The error was The Web Application at could not be found. Verify that you have typed the URL correctly. If the URL sh ...Show All
Hassan Ayoub iexplore.exe - Application Error
I get the following error message when I close my internet explorer. The instruction at "0x62304320" referenced memory at "0x62304320", The memory could not be "read". Click on OK to terminate that program. Any ideas what is causing this Not sure if this is related, but I get a cannot read memory at location 0xXXXXXXX (varies) after I have 8-10 browser pages open, no matter what site I am at. I've learned to live with it, but sometimes, because of pop-ups, it still gets me. When it happens the mouse become slugggish and nothing it responsive. Then 6-8 minutes later, I get the error message. I've gone through several versions of IE and also several complete me ...Show All
bfarr23 pos peripherals from vba
I want to use point of service peripherals from vba in ms access, as I am creating a point of sale database. I downloaded pos for .net sdk. I then tried to reference its main library (microsoft.pointofservice.dll) from vba (by going tools>references), but it wouldn't let me, it said it couldn't create a reference to the file, which is a dll. How can I link to the pos peripherals from vba I don't have a C++ compiler, so I can't write a wrapper, right Where could I find an unmanaged version Hi, The .Net DLL is a managed DLL. So you can't directly link it to VBA. What you can to is try to find a ...Show All
Techquest Macro to Delete Rows
Hi, I am writing a macro that I want to do the following with: 1-Sort spreadsheet by column J. 2-Search for the first instance of the term "unbilled." 3-From that point and down, delete all rows below. 4-Delete specfic columns. I'm having trouble with steps 2 and 3 - the search works, but for the deleting of the rows, it's picking a specific row range. I want it to delete all rows from the first instance of the search term, down to the bottom of the spreadsheet. Each spreadsheet will have a different row range for this, so it can't be a specific range. Any help I can receive would be greatly appreciated. Here is the code: Sub () ' ' Macro ' Macro recorded 1/4/2007 by ___________' ' Keyboard Shortcut: ...Show All
Neuman subscript out of range
I am getting an error when running the script Do While (Not (Workbooks(bookmonth).Worksheets("by associate").Cells(4, i) = "dsl") Or Not (Workbooks(bookmonth).Worksheets("by associate").Cells(4, i) = "hsi")) I am uncertain why this is coming up. i is currently set to 1, so it should be starting to search in cell a1. Hi, If i is currently 1 then are the other indexes correct What's in the variable bookmonth Is the sheetname really " by associate". Perhaps there is a extra space somewhere. I can not see anything wrong with the code that would produce a type mismatch on that line. Any value contained in the cell A4 would be compared to the two string values and would e ...Show All
mr4100 web query failure, On Error didn't work
Once in a few hundred web queries I get an timeout error of some sort (unable to locate resource or no response) on the last line .Refresh BackgroundQuery := False. I don't see why the "On Error" declaration didn't get me out of this problem. Any insights would be much appreciated. Regards, Brian code excerpt................................................................................................................. On Error GoTo query3error With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://finance.yahoo.com/q s=" & ticker, Destination:=Range("A1")) .Name = "q s=" & ticker .FieldNames = True .RowNumbers = False .FillAdjacentFormu ...Show All
llkoolj sending emails from MS Word with variable subject line
Hi, I've searched these forums but have not been able to find exactly what I need. I know how to send emails with VBA in Word, but the only problem I have is that as far as i'm aware the subject line is always fixed in the code ( .Subject = "New subject" ) What i'm trying to do, is send reports i have reviewed to an email address by clicking a button in the toolbar. The email address is always the same but the subject line shows the customer's name and his account number (so that's different all the time) Is there any way I can get the VBA code to copy the first line of the report (which has the customer's account number and name) and use that in the subject ...Show All
AzurianArcher menu tiems for OutputToText, OutputToExcel command dimmed
We have an access application, which has a macro which uses "RunCommand" actions associated with several commands. Two of menu items greyed for unknow reason. They are all available when I run the application from debug mode. However, after we packaged application and installed it. Thoese two menu items are dimmed, no one can select it. The problem started since March of 2006. Do I need to change some settings or permissions to run these two commands P.S. Other commands on the same menu are OK and they are using Runcommands too. ...Show All
Mark Goldstein combine 3 combo boxes values into one string
Hi all, I have a table of data which can filter out my desired information after i selected a range of date, for example 1-Jan-2006 to 15-Jan-2006, in a combo box. I can only choose date being stated in the combo box, not much flexibility. Now, i want to change the format of the combo box. Instead of one combo box which show the date, i want three combo boxes which show "Year", "Month" and "Day". I can choose any year, any month and any day i want and it will filter out. I am thinking of a solution by combining the values of the three combo boxes into one string, one line "1-Jan-2006", and start to filtering. Is this the only way to do it or is there any better ways to do this Below is my existing VB ...Show All
kesim Possible to add multiple (300+) hyperlinks that run the same VBA code?
The code that I want to run is very simple -- it takes the text of the cell containing the hyperlink and copies it a specific range. It also selects the specific range. For example -- a list of 300+ symbols in one column: Excellent, Duck!!! I'm not sure if that will work in my large spreadsheet with 300+ symbols but it certainly worked in my small example. Thanks so much for your help! Still dazed but a little less confused, CodeKid Instead of using Target.Parent , use Target.TextToDisplay . This should sort things out. I've just tested code like this in Excel 2003 and it works fine. Let me know if you're still having trouble. Not really sure I understand what you wan ...Show All
Hamed JI How do I create and use 3D ranges in Excel-VBA
It is easy to create and use 2D range in excel. The following code will do Option Explicit Sub Demo3DRange() Dim sh As Worksheet, r As Range, vData Dim Row As Integer, COl As Integer Set sh = ThisWorkbook.Sheets("Sheet1") Set r = sh.Range(sh.Cells(1, 1), sh.Cells(100, 2)) vData = r.Cells.Value For Row = 1 To 100 For COl = 1 To 2 Debug.Print vData(Row, COl) Next COl Next Row End Sub When we execute the above code, the variant vData will become a 2D array of 100*2. Now my question is following: A)How do I create a 3D range in VBA code B)Can I assign that 3D range to a variant, and get a 3D array, just as I get 2D array in case of 2D range Thanks -Rahul ...Show All
JoeSmith Confidence Limits for the Mean
Hi; I need some code that will let me work out the upper and lower confidence limits for the mean without using the excel confidence function I think that when you understand how the formula behind calculating the confidence means / limits will eventually help you with finding the code that fits your solution / application the best. Therefore i've been searching online on how the formula is actually put together and found the following pages: http://onlinestatbook.com/chapter8/mean.html http://www.cyclismo.org/tutorial/R/confidence.html I hope that these will help with finding the solution which suits your application the best. ...Show All
