Excel-koodinpätkiä vedonlyöjälle
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Excel-koodinpätkiä vedonlyöjälle
1. vain VBA-koodeja tähän ketjuun
2. ei makronauhoituksella tehtyjä koodeja, koska ne kaikki pystyy tekemään itsekin
3. koodi "code"-tägiin
4. perään koodin selväkielinen selostus
Pidemmittä viivyttelemättä (seuraavissa viesteissä):
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Sub ConvertTextToDate()
Range("tähän haluttu solu").Select
Dim Current_Date As Date
Dim Date_String As String
Date_String = ActiveCell.Value
Current_Date = CDate(Date_String)
ActiveCell.Value = Current_Date
End Sub
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Sub LastUsedCellColumn()
Range("A:A" & Cells.Rows.Count).End(xlUp).Select
End Sub
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
For i = 1 to rows.count
"koodinpätkä tähän"
next i
Koodi: Valitse kaikki
For i = 1 to 30
"koodinpätkä tähän"
next i
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Dim FindString As String
Dim Rng As Range
FindString = "tähän se merkkijono jota etsitään"
If Trim(FindString) <> "" Then
With Sheets("Sheet1").Range("tähän se alue, jolta merkkijonoa etsitään")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
Lookat:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
'Application.Goto Rng, True
Rng.Activate
Else
End If
End With
End If
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate ActiveCell.Offset(x,y).Hyperlinks(1).Address
Do Until .ReadyState = 4: DoEvents: Loop 'wait until loaded
End With
IE.Quit
IE.Quit
Y = aktiivisesta solusta Y kpl sivuttaissuunnassa poikkeava solu
Käskee IE:a surffaamaan ko solussa olevan Hyperlinkin takana olevaan osoitteeseen ja odottaa että sivu on kokonaan ladattu. (Sitten voi käskeä IE:a tekemään jotain muuta....)
Muita tapoja käskeä IE:a surffamaan osoitteeseen:
Koodi: Valitse kaikki
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate ActiveCell.Offset(x,y)
Do Until .ReadyState = 4: DoEvents: Loop
End With
IE.Quit
IE.Quit
Koodi: Valitse kaikki
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate "www.ylikerroin.com"
Do Until .ReadyState = 4: DoEvents: Loop
End With
IE.Quit
IE.Quit
"IE.Quit"-käsky tavataan laittaa aina kahteen kertaan, koska tunnetusti MS-ohjelmat eivät koskaan tee sitä mitä käsketään , eikä IE-objektia haluta jättää taustalle kuluttamaan muistia...
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
IE.ExecWB 17, 0 ' valitsee koko sivun
IE.ExecWB 12, 2 ' kopioi valinnan
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
For Each obj In ie.document.all
If InStr(obj.innerHTML, "tähän nappulassa tai välilehdessä oleva teksti") > 0 Then
obj.Click
obj.FireEvent ("onclick")
End If
Next
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate "www.ylikerroin.com"
Do Until .ReadyState = 4: DoEvents: Loop
Application.Wait (Now + TimeValue("0:00:02"))
End With
IE.Quit
IE.Quit
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Sub GetOneTable()
Dim Document As Object
Dim StatementTable As HTMLTable
Set Document = CreateObject("HTMLFile")
With CreateObject("msxml2.xmlhttp")
.Open "GET", "http://www.betexplorer.com/soccer/england/conference-premier/", False
.send
Do: DoEvents: Loop Until .readyState = 4
Document.body.innerHTML = .responseText
.abort
End With
Set StatementTable = Document.getElementById("league-summary-next")
With StatementTable
For r = 0 To .Rows.Length - 1
For c = 0 To .Rows(r).Cells.Length - 1
Sheets("Sheet1").Cells(r + 1, c + 1).Value = .Rows(r).Cells(c).innerText
Next c
Next r
End With
End Sub
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
- lammpa-1
- Jäsen
- Viestit: 2186
- Liittynyt: 20.01.2007, 11:16
-
Tuotto: +96.12 yks.
Palautus%: 111.49%
Panosten ka: 2.56 yks.
Vetoja: 327
- Pisteitä: 873
Re: Excel-koodinpätkiä vedonlyöjälle
Koodi: Valitse kaikki
Dim MyRange As Range
For Each MyRange In ActiveSheet.UsedRange
If 0 < InStr(MyRange, Chr(10)) Then
MyRange = Replace(MyRange, Chr(10), "")
End If
Next
For Each MyRange In ActiveSheet.UsedRange
If 0 < InStr(MyRange, Chr(13)) Then
MyRange = Replace(MyRange, Chr(13), "")
End If
Next
You bet your money and in the worst case you can only lose.... bet your ass and you might really get hurt...
Minikommentit
10.10.2014 17:49 <S.Mäenala> Tätä juuri on modulaarinen ohjelmointi! Itsellänikin suuri..
10.10.2014 17:50 <S.Mäenala> moduulikirjasto, josta testattuja koodeja on mukava poimia.
10.10.2014 17:54 <S.Mäenala> Tuon allaolevan tapaisia jokainen kurssilainen naputtelee..
10.10.2014 17:54 <S.Mäenala> tuota pikaa.. ;)