File System Object
Feb 14, 2007how the "File System object" works in Excel?
I have a various information in one log file, which need to import to excel. So it's i need to declare all fields i need?
how the "File System object" works in Excel?
I have a various information in one log file, which need to import to excel. So it's i need to declare all fields i need?
I've followed a couple of the FSO threads and come up with the code below however I keep getting a 'Runtime Error 76 - Path not found'.
Sub scan_station()
Dim FSO As New FileSystemObject
Dim dest As String
Dim dname As String
dest = "L:eBISScan Station"
dname = "Scans(" & Date & ").csv"
FSO.copyfile "H: odaysscans.csv", dest & dname
End Sub
It hangs at the area coloured red. However if I hard code the full path and name as I've done with the source information it works fine.
I had a working subroutine which I moved to another workbook (rather than linking to it and having both workbooks open at the same time).
Now I get "user-defined type not defined" when it runs. Here is the beginning of the
Global oApp As Object
Sub UpdateForecasts()
Call Update1
Call Update2
End Sub
Sub Update1()
Dim dPath As String
Dim dDest As String
Dim dCondition As String
Dim dName As String
Dim FSO As New FileSystemObject
I have created workbooks for four health regions to collect data, which then needs to be resubmitted via FTP, but with de-identified data. The end users have little to no excel experience, thus had to make it simple as possible. Created a button that runs the macro (below) to deidentify (clear) all cells where there could possibly be personal identifying information. Runs fine on my cpu, but one user (so far) has received the error noted in the title. Both running excel 2003 with SP3 (I have version 11.8169.8172, user has 11.8316.8221), I have XP professional SP2, user has XP professional SP3. Spent hours searching and reading suggestions online, to no avail.
View 3 Replies View RelatedI have just signed up to the forums as I am having a very specific problem. I have looked on google and used the search feature (on several forums!) and found very limited information that is useful to me. I am having trouble with a very simple few lines of code in a macro. The code looks like this:
Function startmarketIDs()
Dim targeturl, writerow, readrow, textmass, xmlHTTP
targeturl = "http://lite.betfair.com/ Events.do?s=00010913z"
Set xmlHTTP = CreateObject("Microsoft.xmlHTTP")
xmlHTTP.Open "GET", targeturl, False
xmlHTTP.send
MsgBox xmlHTTP.StatusText
textmass = xmlHTTP.responsetext
MsgBox textmass
End Function
My problem occurs at the line "textmass = xmlHTTP.responsetext". The responsetext command is obviously causing problems because if I remove it, the code executes without error and the "xmlHTTP.statustext" says "OK". With the responsetext command left in, the code generates the following error: Run-time error '-1072896658 (c00ce56e)': System Error: -1072896658. If I change the targeturl to www.betfair.com, the code executes fine and I get a message box (as desired) with the source code of the website displayed. Without meaning to sound like Im answering my own question (!!), perhaps there is something about the url or the way in which I am using the xmlHTTP object that is causing the issue, I wondered if someone would mind inspecting my code and perhaps pointing me in the right direction?
How do I add the system time to a file name
My
ChDir "S:ProductionProduction Request Forms"
ActiveWorkbook.SaveAs Filename:= _
"S:ProductionProduction Request Forms" & SaveWorkbook & "_Request" & Time & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
I've added an word object to my excel sheet as an icon. The only problem is that it shows the word icon then under it says 'Microsoft Word Document'. This might be an obvious and silly question. But how do I Rename the 'Microsoft Word Document' to a title of my choice?
View 2 Replies View RelatedI've inserted a Solidworks drawing into a worksheet & wish to change the displayed image using VB. I suspect this could be done by changing it's source file, but can't get the code to work.
View 3 Replies View RelatedI'm getting the following error:
"Object library invalid or contains references to object definitions that could not be found"
I wasn't getting that error last night and I'm not sure what I may have done to cause this error.
It seems to be cause by code running on one sheet of my workbook, but I'm not really sure about that. I'm still a bit of a novice at VBA.
I'm using Excel 2002 SP3 and I'm running MS XP Home as my OS.
Do you have any ideas what can cause this error and/or how to trace down the offending objects/code?
I have embeded a PDF file in an Excel Worksheet. When I double-click to open the PDF file the I get an error message: "Cannot start the source application for this object." However, the pdf file opens anyway. how to prevent the error message from displaying (without stopping real error messages)? (...happens in Excel 2000 and Excel 2003) NB: I researched this site first - user "Ed" raised the same issue 27/1/03 - but it doesn't appear to have been resloved.
View 4 Replies View Related1) i have office 2003 on a laptop. within powerpoint, i can create a 'microsoft excel chart 11' object. to create a link to the excel data source, do i have to go through the odbc sql setup? it works, but i don't want my powerpoint to be dependent on some excel file somewhere. what are the other options to insert/make a functional pivot chart in powerpoint with the data also within powerpoint? the data as sheet option does not result in the chart being a pivot, it's just a plain chart. it has to be a proper object, not an image paste or a chart that updates links with the excel file open.
2) i have office 2007 on my other laptop. i can not find any suitable object to choose from to make a pivot chart in powerpoint. what's the best way to go about in 2007 version?
3) am i going about this the wrong way with the objects? should i be after vba code?
Currently I'm working on a prediction game using excel. Can excel do the tabulation itself(Points awarded) if I just key in the result? Can anyone help me? Thanks in advance.
Examples below,
Result 3-1
Name Predicted Scored Points
Alex 3-1 5
Brian 4-1 4
Charlie 2-0 3
Derrick 3-3 1
Eric 0-2 0
Point System:
1 point for correct goals/no goal by either both teams
3 points for correct result ( Win, Lose, or Draw - say result is 3-1, 3 points if you predicted a Chelsea 2-0 win)
5 points for correct match results
No points for incorrect score and results.
I'm trying to create a lesson booking system,
View 11 Replies View RelatedI m trying make a spreadsheet up to fine the following i have also included a file
raymond ran 11 seconds so he gets 150 points which is .6 of a second better than his Personal best time (PB's) but matt ran 13.6 seconds but it is 1.1 seconds slower than his Personal best time so he is minus 275 for every .100 of a second they get 25 points added or taken off
Im looking for a ELO rating. Its a system which they often use with Chess.
View 3 Replies View RelatedWondering if there is a formula for Excel that could replicate a numbering format like in Word?
Example:
A1.1.
A1.1.1.
A1.1.2.
A1.2.
A1.2.1.
A1.2.2.
A1.3.
and so on...
Idealy I would like to go farther than the 3rd level.
Below is a formula that links other worksheets from other workbooks to cell B4. If I copied this to another computer system in My Documents that is named other than Tom would the links get updated to that system. If not is there a macro that can handle this to be updated to another computer system.
=('C:Documents and SettingsTomMy DocumentsHORSESHOE MASTER SCOREBOARD[2007 HORSESHOE SCOREBOARD TO 15 PTS. ANDREA & ROGER''S.xlsm] PAID UP '!B4)+('C:Documents and SettingsTomMy DocumentsHORSESHOE MASTER SCOREBOARD[2007 HORSESHOE SCOREBOARD TO 15 PTS. DAVE & PAULA''S.xlsm] PAID UP '!B4)+('C:Documents and SettingsTomMy DocumentsHORSESHOE MASTER SCOREBOARD[2007 HORSESHOE SCOREBOARD TO 15 PTS. DAVE DUVAL''S.xlsm] PAID UP '!B4)+('C:Documents and SettingsTomMy DocumentsHORSESHOE MASTER SCOREBOARD[2007 HORSESHOE SCOREBOARD TO 15 PTS. PHIL & YVETTE''S.xlsm] PAID UP '!B4)+('C:Documents and SettingsTomMy DocumentsHORSESHOE MASTER SCOREBOARD[2007 HORSESHOE SCOREBOARD TO 15 PTS.
how the Process to solve the following problem:
1A = 15x + 32y + 5z
1B = 6x + 2y + 8z
1C = 3x + 11y + 19z ...
We have 100+ clients. Each client has inventory in our warehouse. Every day we write down how many items went out to our client on a piece of paper and subtract that number to get a balance inventory. When we run low, we order more on a new FO number. What is the best approach for tracking this? I was thinking one way is to put our clients in a drop box at the top of the page and then the data will appear at the bottom, however I can't get that to work. I am trying filters to see, but I am unable to subtract the balance automatically from the last FO# and from the correct area.
Is there a way to choose a client and product at the top of the page and have the tracking below?
I am looking to create a system to measure KPI (key performance indicators). I need to include a weekly target and then measure performance for that week against the target. I want to create a form to make data entry simple, how best it would be to implement using excel. Would I have 2 tables, one for targets and one for performance and then use look ups.
View 9 Replies View RelatedIve got an example below of how i'm sorting fixtures and how to determine winners/losers and draws.
******** ******************** ************************************************************************>Microsoft Excel - Book2___Running: 11.0 : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutF1G1H1F2G2H2F3G3H3F4G4H4=
ABCDEFGH102/03/2007Team*A**Team*B000202/03/2007Team*C**Team*D000309/03/2007Team*A**Team*D000409/03/2007Team*B**TeamC000Sheet1*
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
What I'm struggling with is the ability to change dates and still be able to add the teams figures up.
When adding, for instance, Team A's wins I'm using
=f1+f3
and similar for defeats and draws.
But when I change dates, for instance game 3 to the 10th, Team A is still counting F1 and F3 yet its games now in row 1 and row 4.
How can i get it to change with the sorting.
Im sorting fixtures via the sort feature in data.
I have a button in a template file (.xlt) that will save the file as the customer name in cell C4. That template file feeds an Access database and when you save the template file you are prompted with the following system message:
If record DOES NOT exist in DB:
If record DOES exist in DB:
My code is as follows: ....
In MS Query:
Like '%ST%DF%'
Works fine.and returns:
DOCIDREVISION
31ST-9DF02007
40ST-9DF01006
73ST-9DF01016
74ST-9DF01011
74ST-9DF02004
I want to use the [Enter system] for the DF part.
When I try to use the following in MS Query:
Like '%ST' & [Enter Sys] & '%'
the pop up window appears but after entering DF
I receive an error: Missing Right parenthisis or illeagal variable?
The macro below will generate a System Error '-2147417848 (80010108)' when executed as shown below but only when there is a value in the 6th column that ends in .0006(or .00061). It will however run if no empty cells are present after the cell with .0006 in the 6th column (i.e. J = 1 to 6). This can be avoided by using the "On Error Resume Next". What is strange is if the value ends in anything other than .0006(or.0061) in the 6th column it will work fine (i.e. .00062 or .0005).
In a new workbook I have the following values in A1:B6
1125924.4684333.2496895-1217.935514LOFT -1785884.895
2422123847.627 221.0003 -482.8184125LOFT -1698521.0006
The Macro:
Sub Macro1()
'
'
'On Error Resume Next
Application.Calculation = xlCalculationManual
Set OldWb = ActiveWorkbook
Set NewWb = Workbooks.Add
Application.ScreenUpdating = False
For I = 1 To 2
For J = 1 To 7
NewWb.Sheets("Sheet1").Cells(I, J) = OldWb.Sheets("Sheet1").Cells(I, J)
Next J
Next I
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
I am trying to get the username from the system to display in A1 in a file in Excel. I got this code form internet and put it in the sheet by clicking right mouse on the sheet1 tab and view code and then pasted it there.
Function UserNameWindows() As String
UserNameWindows = Environ("USRNAME")
End Function
And then as per the instructions on the same page I inserted this formula in A1 : =UserNameWindows()
The person stated that by doing this, I should be able to get user name displayed in A1. BUt all it gives me is #NAME?.
I am trying to work out a point scoring system and have the following formula =IF(OR(C9="",F9="",'Winning Scores'!C7="",'Winning Scores'!F7=""),0,IF(C9+F9='Winning Scores'!C7+'Winning Scores'!F7,"3","0")+IF(OR(AND(C9>F9,'Winning Scores'!C7>'Winning Scores'!F7),AND(AM!C9<AM!F9,'Winning Scores'!C7<'Winning Scores'!F7)),1,0))
Which is basically saying that if C7 and F7 = C9 and F9 in the 'winning scores spreadsheet, to give 3 points but it is returning 3 points if C7=F9, and I only want it to relate to C7 - do you know how I would do this?
I also need to award 1 point if the highest score is chosen but not if the exact score, hence if the score was '3' '2' and the person chose these exact numbers 3 points would be awarded but it they chose '3' 1' only 1 point would be awarded as they chose the winning team
I'm currently studying japanese and I need to make a flashcard system so that I can memorise words a lot faster. An old friend told me that it is possible to make a flashcard system in excel (or maybe Access due to its database system - I cant remember which sorry). I'm looking at a basic system that first shows me the japanese - then i click it and it reveals the english, click the english and it then moves onto the next japanese word etc etc. Though, I have no idea where to start in building such a system, my excel knowledge is not great but it I'll give anything a try
View 2 Replies View RelatedI am trying to create a spreadsheet that will automatically create a ranking system after data is input manually.
If you look in the example, you'll see roughly 30 people will be ranked on various metrics, and on another sheet, I would like 1-30 to be displayed in each of the different metrics, thus creating a ranking.
I'm not sure how to go about doing this, and any help would be greatful. I've tried different excel tutorials and searched and searced the help features, but couldn't exactly find what i was looking for.
I've got this code that I use to open the active session of a program I use (EXTRA! 8.0). When I try to code it to open a specific new instance of the program, I get a run-time error 429. When I debug, it's stopping on the line where I get the new instance. I've searched on this issue, but I still don't understand what the problem is.
Sub log_in()
Dim Sys As Object
Dim Sess2 As Object
Dim lngOldSysTimeout As Long
Set Sys = CreateObject("EXTRA.System")
If Sys Is Nothing Then
MsgBox Prompt:="EXTRA! not properly installed on this PC." _
& " Terminating execution.", Buttons:=16, _
Title:="E!PC Not Properly Installed"
Exit Sub
End If
Set Sess2 = GetObject("C:Program FilesExtra!sessionsCCS2.edp")
If Sess2 Is Nothing Then
MsgBox Prompt:="DLC.edp not found. Terminating execution." _
, Buttons:=16, Title:="E!PC Not Properly Installed"
Exit Sub
End If
End Sub
how can I detect the OS of the computer a sheet is running on and launch a macro accordingly?
I have built a calculator that utilizes an embedded wave file but doesn't work correctly with Vista. With Vista it actually causes WMP to be launched instead of just playing the file. So I was hoping to be able to skip the sound on Vista machines but play for all other OS's.