Snip2Code is shutting down.
It has been quite a ride, since 2013 when we launched our first prototype: thanks to the effort of you guys we collected more than 3 million snippets!
We are very proud to help all our users to be more efficient in their jobs, and to be the central point to share programming knowledge for everyone.
Our basic service is free, so we always survived on our own resources to give you Snip2Code.
Unfortunately, we are no more in the financial position to sustain this effort, and therefore we are announcing here our permanent shut down,
which will take place on August 1st, 2020.
Please save your private snippets using our backup function in the settings, here.
This will allow us to pay for the servers and the infrastructure. If you want to donate, Contact Us!
Reputation Top 1%
Bora Ayper
15 Snippets  (53rd place)
1 Channel
6 Channels
309 points  (100th place)
Top 10% Publisher
Junior Code Generator
Serious Code Generator
Senior Code Generator
Junior Popular Coder
Junior Autobiographer
Senior Autobiographer

Recent Snippets See all snippets by BoraAyper

public by BoraAyper  98  1  1  0

vba object properties Get-Let

// Enter here the actual content of the snippet.					

//Private olarak property olarak gelecek deger uzerinde kontrol saglayacagimiz
// degisken yap
Private p_alan_kaca_bolunecek As Integer

// bu alttaki olaylar bu deger uzerinfde kontrol saglamak icin
//mesela bolunecek alan 100 u gecmeyecek diyeceksek bu get let de belirleyebiliriz
Public Property Get alan_kaca_bolunecek() As Integer
    alan_kaca_bolunecek = p_alan_kaca_bolunecek
End Property

Public Property Let alan_kaca_bolunecek(Value As Integer)
    p_alan_kaca_bolunecek = Value
End Property

public by BoraAyper  90  0  1  0

call module

// Enter here the actual content of the snippet.

Call Module2.Bora_EMA_Optimizer(Range("t1"), Range("t2"), Range("t11"), Range("t12"), Range("t13"), Range("t14"), Range("q10"), Range("q11"), Range("q12"), Range("q13"), Range("q9"))

public by BoraAyper  103  1  2  0

Get RowNum

// Enter here the actual content of the snippet.						

Function GetRowNum(Simpson_son_tarih)
Dim lrow As Long

    //Specifies that when a run-time error occurs, control goes to the statement immediately following 
    //the statement where the error occurred, and execution continues from that point. Use this form rather than On Error GoTo when accessing objects.
    On Error Resume Next
    lrow = Application.WorksheetFunction.Match(Simpson_son_tarih, Worksheets("Data").Range("a1:a5000"), 0)
    //Disables enabled error handler in the current procedure and resets it to Nothing.
    On Error GoTo 0
    If lrow > 0 Then
    GetRowNum = lrow
    End If

End Function         

public by BoraAyper  100  1  1  0

For Each Cell usage

// Enter here the actual content of the snippet.						


Set WS = Worksheets("EMA Analiz (2)")
With WS
    Set LastCella = .Cells(.Rows.Count, "a").End(xlUp)
    lastcellrownumber = Application.WorksheetFunction.max(LastCella.Row)
End With
Set rng = Worksheets("EMA Analiz (2)").Range("E2:E" & lastcellrownumber)

sonuc_satiri_arti_bir = 0

For Each cll In rng
Next cll

public by BoraAyper  87  1  1  0

VBA random function

// Enter here the actual content of the snippet.	

Range("t1") = Rnd() * -1
Range("t2") = Rnd()

Range("t3") = Application.WorksheetFunction.RandBetween(-25, 0)
Range("t4") = Application.WorksheetFunction.RandBetween(-5, 30)

Range("t7") = Application.WorksheetFunction.RandBetween(50, 70)
Range("t8") = Application.WorksheetFunction.RandBetween(60, 90)

Range("t9") = Rnd(1) * -1
Range("t10") = Rnd(1)