What I have is a csv file that was generated in a unix program and a plain text file generated by a windows application. The text file identifies which lines in the csv files contain an error (not an excel error, an error in a 3rd party program). What I need to be able to do is compare both files in VBA and output to text a csv file containing only the errors then output to excel a count of the errors. the code I use is:
Sub extbyconnum() Application. ScreenUpdating = False Dim IOame As String, _ FName As String, _ OName As String, _ INum As Integer, _ FNum As Integer, _ ONum As Integer, _ InputLine As String, _ CCnt As Long, _ DCnt As Long, _ iline As String, _ ichar As String, _ cons() As String, _.......................
I have a userform with a listbox that has 6 columns (D2:I50) which works great. In column J (J2:J50), I have data which needs wrapping so I plan on putting it in its own listbox. Is it possible to have another list box but one that operates as the first one is scrolled?
I have more than seven if statements but don't know how to connect them.
works =IF(C2=$A$2,13,IF(C2=$A$3,7,IF(C2=$A$4,5,0)))works IF(C2=$A$4,,IF(C2=$A$5,3,IF(C2=$A$6,3,IF(C2=$A$7,3,IF(C2=$A$8,3,IF(C2=$A$9,3,IF(C2=$A$10,3,IF(C2=$A$11,3,0))))))))can these be connected? they work for me separately but not all in one.
I've tried Named but that doesn't work because there are way too many things I need to do w/ it.
Im writing a program in VBA excel that displays two circles in excel spreadsheet, these two circles have been set X and Y Co - ordinates. Using the X and Y Co - ordinates i want to connect a line from shape 1 to shape 2
I was trying to move data from excel to access database in VBA. not sure if this has been done before.
What i have got at the moment is that there are some data in excel spreadsheet that i can dump into the table in the access database. My problem here is i need to be able to open the database first, set up connection, and then perform SQL insert query command.
So in the worksheet, i have a button with the following codes in it so far i could just manage to open the database as follows
Is there a way to connect direct to the newsgroup below via OE6: microsoft.public.excel.worksheetfunctions It doesn't appear in the newsgroups' list ..
how to do this with Java but not VBA, I have the capability of understanding it I just need to know where to look because I can't seem to find any solid information on the net from my searches. Does anyone have any websites, other threads or anything they could direct me to for this kind of thing.
I was contemplating putting this in the Access thread but I want to connect to Access through Excel so I think it fits both.
My plan is to use a macro to send specific cells to five seperate tables in an Access database using VBA and SQL.
I've created a button on a sheet that triggers the creation of a checkbox on the ActiveCell. I also want the checkbox to link to the activecell in order to use the TRUE or FALSE values in an AutoFilter. I used the following code, but the checkbox doesn't link to the ActiveCell. I thought it might be because the LinkedCell = "TEXT" whereas a Range isn't text?
Sub AddHoekCheckBox() Dim MyRange As Range Dim CBLeft As String, CBTop As String, ctlName As String Dim cbObj As OLEObject Dim MyDoc As Worksheet Set MyRange = ActiveCell CBLeft = CallByName(MyRange, "left", VbGet) + 0.25 * CallByName(MyRange, "Width", VbGet) CBTop = CallByName(MyRange, "Top", VbGet)...........................
I'm trying to get my macro to connect to Infomaker and run a query. I have successfully done this in the past by using the record macro function. But, when I try to record the macro and paste the query syntax from Infomaker into the commandtext box of the connection, I get the "too many line continuations" error.
I've been looking at ways to write the code rather than record, but the syntax for the Infomaker queries doesn't seem to mesh well.
The syntax of the query in Infomaker is (copy/pasted, all "'s are necessary):
I'm looking to get a macro (or other trick) to count differences in words between two strings.
For example, these twostrings:
“Hi there John, this is Dave” versus “Hi where, this is old Dave”
Have THREE differences (at the word level) in this example. All I really need to know is how many total words are different: deleted, substituted, or added.
I have 6 Slicers in called "Quantrix" The slicers are called REG, DIRECTOR, AREA MANAGER, AOI, DMA, AG and CLOCK. I have 15 pivots (6 in Quantrix tab and 9 in a tab called "Pivots").
I have vba code to update all pivot cache (showing 1 pivot update below) ...
PHP Code:Â
    Max = Sheets("eLink_Raw").Cells(Rows.Count, "A").End(xlUp).Row     Sheets("Quantrix").PivotTables("Quantrix 1").ChangePivotCache ActiveWorkbook. _       PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _       Sheets("eLink_Raw").Range("A1:AW" & Max).CurrentRegion _       , Version:=xlPivotTableVersion14)Â
Here is the code to disconnect SLICER, update source data for ALL pivots then reconnects slicer... This works great but its ONLY 1 SLICER
PHP Code:Â
 Dim vPivots As Variant     Dim i As Long     Max = Sheets("eLink_Raw").Cells(Rows.Count, "A").End(xlUp).Row     With ActiveWorkbook.SlicerCaches("Slicer_REG").PivotTables
[Code] .....
How can i disconnects ALL Slicers, change source data for ALL Pivots then reconnect ALL slicers?
Code: Sub Button1_Click() Dim cnt As ADODB.Connection Dim rst As ADODB.Recordset Dim stSQL As String Dim SNfound As String 'Your sqlserver 2008 connection string Const stADO As String = "Provider=SQLOLEDB.1;" & _ "" & _
[code].....
but i dont see where to put in the Database object...
The Database it needs to connect to in SQl is called
The Server name is SQLSRV when you expand databases the database is called SWHSystem the Table is called dbo.Credential and from that i need to get SELECT All from the Name and CardNumber from dbo.Credential and put that in a New Sheet titled Personal
I have a spreadsheet which I used in a previous job, which was set up by our old IT Department. Basically, it allows me to save information onto it, which I can then retrieve, (in any conditions/search fields i.e. in a date range etc) but the problem is; when I try to use it on my laptop, I look at the editor used for macros, I can see that the spreadsheet is linked to the servers of my old company. Therefore, I cannot use it myself
I do not know a lot about macros etc. but I can send a copy of the spreadsheet to anybody who is willing to help!
I think it is just a case of changing the macros/strings of where to draw and save information to/from, but I don;t know.
I am looking to further improve this code by adding the functionality of logging to a secure HTTPS server using username and password.
Code:
Sub TestFileExistsandDownload() 'This code will test a web address to see if a file exists 'If the file exists, it will download the file. ' It's a mixture of code retreived from 2 sites: ' [URL]... ' [URL]....
I'm trying to open a file from server.After doing all the changes I have to save the file back to the server in the same name. It is asking for save as option.it shouldn't. I want to save the file in the same path and in same name without asking the option of "Save as". I hv full permission for editing the file
I try to run a macro on my workbook everytime I open it by getting the data from the ftp file. This will be the service number for my customer. Both the excel and the data file are located in the ftp, so that I can retrieve the file wherever I go. Basically I got some code from the internet which work fine on the local network, but once it come to ftp server I am stuck there.
Public Function NextSeqNumber(Optional sFileName As String, Optional nSeqNumber As Long = -1) As Long Const sDEFAULT_PATH As String = "Ftp://mycompany.com" Const sDEFAULT_FNAME As String = "Service.txt" Dim nFileNumber As Long nFileNumber = FreeFile If sFileName = "" Then sFileName = sDEFAULT_FNAME If InStr(sFileName, Application.PathSeparator) = 0 Then _ sFileName = sDEFAULT_PATH & Application.PathSeparator & sFileName If nSeqNumber = -1& Then If Dir(sFileName) <> "" Then Open sFileName For Input As nFileNumber Input #nFileNumber, nSeqNumber..................
We have a number of internal office servers (Active Directory - Exchange - SharePoint "free" etc etc usual stuff) and I need to create an uptime/downtime calculator in excel with the facility to record the information on a daily, monthly and yearly bases but not sure how to go about this.
I would like a way to record on a daily bases what the uptime/downtime has been for each server and then to record the same for that month in a percentage.
For example in a 24hr period for each month of the year:
For that day Active Directory Server was UP for 24hrs. (100% uptime) - (0% downtime) X by the number of days in the month i.e. Over the month Active Directory has been UP for. (XX% uptime) - (XX% downtime)
Exchange Server was DOWN for 1hrs. (95.833% uptime) - (x% downtime) X by the number of days in the month i.e. Over the month Exchange has been UP for. (XX% uptime) - (XX% downtime)
SharePoint Server was DOWN for 1hrs. (95.833% uptime) - (x% downtime) X by the number of days in the month i.e. Over the month SharePoint has been UP for. (XX% uptime) - (XX% downtime)
I need to run multiple queries and insert their results into Excel cells. Each query will return only one result (a number, or a null). What is the best way to accomplish this?
Below is an example of the code I'm currently using. It does return data to the cell specified, but I'm guessing there's an easier way to populate multiple cells with the results of multiple queries.
I have code which is convert some range of excel to Png and store to my local drive. This code is working fine.
I have created web site on my intranet and the data store on server, now i use this code and pickup image from my local storage i.e. from "C" Drive and paste in to service folder, bcoz i uploaded report as a Image and it timely refreshed and changed
Is there any way so this code directly store to service folder, if i can use IP address or HTTP path
I had tried with HTTP path but it is not working.
My server path is [URL] ....... OR
Is there any way when local folder got image than automatically server folder also get same image...
Sub bah() ''' Set Range you want to export to file Dim rgExp As Range: Set rgExp = Range("B2:C6") ''' Copy range as picture onto Clipboard rgExp.CopyPicture Appearance:=xlScreen, format:=xlBitmap ''' Create an empty chart with exact size of range copied
How to pull data with a VLOOKUP to a file located on a Server.
My big problem is not understanding the syntax of the Server location. I've provided it below (obviously with some character changes).
I have a file located on my Hard Drive. I need to perform a VLOOKUP from A2 on this spreadsheet. The File on the Server is called "LookupTest.xls". The Range of Data is from Sheet 1 and is from A2:C4 and I need to pull the data from column C depending on what is selected from A2 from the file on my HD. I understand how to use VLOOKUP, just not when I'm pointing to another file on a Server.
Server mapping from Windows Explorer:
rbbabc$ on 'RP17409 - ABC Database (AHSSRVVN678.tge.com)'
Again, that server mapping is fake, as I changed it, but this is how it looks on Windows Explorer.
I'm trying to keep a master file of Data on a spreadsheet found on a server so that one master file can be updated, and several other tools pull from that Master File on VLOOKUP, Validation Lists, etc.
I'm creating my first stored procedure ever and it looks relatively good so far. The problem is with passing the parameters, more exactly:
Arguments are of wrong type, are out of acceptable range, or are in confilict with one another
The essential part of the stored procedure looks like:
Code: CREATE PROC GetUserAuthForApp @User varchar(7), @application int AS
while the essential code calling it from VBA looks like:
Code: Dim strConn As String 'Connection string to SQL Server Dim strSQLtoExecute As String 'SQL query string to execute Dim oConn As ADODB.Connection 'Object for connecting Dim rs As ADODB.Recordset 'Object for recordset Dim cmd As ADODB.Command Dim prmUser As ADODB.Parameter Dim prmApplication As ADODB.Parameter Dim stProcName As String 'Stored Procedure name