I was write code for excel vba xml database values write into text file. when i using without any special characters xml values parsed into their text file without any issues but when i using special characters xml cannot parse special characters (&,- etc) error getting on my macro page. Anyone have any ideas on how to resolve this? Dim XDoc1 As Object Dim XHTML1 As IHTMLElement Dim XURL1 As String Dim CustomerName1 As String Set XDoc1 = CreateObject("MSXML2.DOMDocument") XDoc1.async = False: XDoc1.validateOnParse = False XDoc1.Load ("http://www.beamon.com/windows_application/macro1.php" + "?Id=" + Sheets(1).Range("D2")) Set Lists = XDoc1.DocumentElement Set getFirstChild = Lists.FirstChild Set …

Member Avatar
Member Avatar
+0 forum 1

Hey Everybody. I have been asked to create a spreadsheet that will create a list of matches, for example in Table 1. (Please see the tables attached). OK, fair enough, basic table so far. What I want to do is have three columns, that will return the results that match the criteria given. So say for example I have the following values in Table 2 This would return a list of results detailing that Result 1 and Result 2 as having "x's" in those columns. Can this be done? If so, can you pleae point me in the right direction. …

Member Avatar
Member Avatar
+0 forum 3

The below bit of code is running very very slowly. I cant see why this should be but there seems to be almost a second delay when I'm using f8 to run through the code bit by bit when I get to the end if...any clues? [code] Sub firstResponse() Dim rCell As Range For Each rCell In Range("S2:S462") If rCell.Offset(0, 3).Value = 1 Then rCell.Value = "CLICK" ElseIf rCell.Offset(0, 1).Value = 1 Then rCell.Value = "OPEN" ElseIf rCell.Offset(0, 2).Value = 1 Then rCell.Value = "BOUNCE" ElseIf rCell.Offset(0, 1).Value = "" Then rCell.Value = "" Else: rCell.Value = "NONE" End If …

Member Avatar
Member Avatar
+0 forum 8

Hello, i would to import the last modified txt file from a directory (c:\Folder) using a macro in Excel. I have a folder which is incremented everyday by a new txt file. The goal is to import the last txt file added in the direrctory. I've already created a an Excel file with a button affected to macro. Here is the code: Sub Import() ' ' Import Macro ' Macro saved on 02/03/2011 by StYellowknife3000 ' ' [CODE] With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\Folder\File_01.txt", Destination:= _ Range("A1")) .Name = "File_01" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True …

Member Avatar
+0 forum 0

How do I add a Macro to an Excel Sheet using Late Binding? I had the code working using Excel(2010) PIA: [CODE] //create a new VBA control module oModule = oWorkbook.VBProject.VBComponents.Add(VBIDE.vbext_ComponentType.vbext_ct_StdModule); //Add the VBA macro to the new code module oModule.CodeModule.AddFromString(sCode) //sCode is the VBA macro I created;[/CODE] I now have to support multiple versions of Excel so I have to use Late Binding. I have been able to create an Excel Worksheet and populate it. All I have left to do is add a macro to a work book. Code creating Excel Worksheet: [CODE]objClassType = Type.GetTypeFromProgID("Excel.Application"); oExcelObject = Activator.CreateInstance(objClassType); …

Member Avatar
Member Avatar
+1 forum 6

I need to move a chart from one sheet to another in an Excel workbook, and I am having issues with different versions of Windows and Excel. Here is the code I am currently using: (excelApp is declared correctly) [code]excelApp.Workbooks("Book 1").Sheets("Sheet 1").ChartObjects(1).Chart.Location(2, "Chart 2")[/code] This works perfectly and consistently with Windows 7 and Microsoft Office 2007, but fails whenever I try it with Windows XP and Office XP, or Windows XP and Office 2003. I need it to work with the last two setups, so any help would be greatly appreciated. Thanks, Jordan

Member Avatar
+0 forum 0

Hey all, I'm working a spreadsheet in excel. Basically, it looks like this: In Column A there's a 4-digit number. Column B, there's 2 things one cell with an entry like this A0000000, for example, and right under that, a 4-digit number. Column C is a person's name. what I want to do is take every 2nd cell in column B (the one with a 4-digit number) and MOVE it to Column D, so each entry is in one row. So it would look like this: A B C D 1111 A00000000 John Doe 2222 Any ideas?

Member Avatar
+0 forum 0

I know just little enough about building macros in Excel with VB to be dangerous and currently have the following situation. I've created a macro for use with log files that generally contain the same information. The macro was recorded using the Ctrl+F action to find text string 1, go to the cell containing text string 1, copy the entire contents of the cell, paste it in a new cell at the top of the page in certain cell and then move on to find text string 2, go to the cell containing text string 2, copy the entire contents... …

Member Avatar
Member Avatar
+0 forum 3

The End.