• Log in or sign up for an account here: https://www.sythe.org/login

A few simple questions. :)

I need it to add one to every button depending on what the caption number is, of the button i click and the button i click needs to become Zero.

Heres the source, it might make it easier to understand.
 

Attachments

I need it to add one to every button depending on what the caption number is, of the button i click and the button i click needs to become Zero.

Heres the source, it might make it easier to understand.

I R LEET. (Attached)

Code:
Option Explicit

Private Sub Cap_Click(Index As Integer)
    Dim i As Long
    Dim tempIndex As Long
    Dim tempLoop As Long
    tempLoop = CLng(Val(Cap(Index).Caption))
    Cap(Index).Caption = "0"
    tempIndex = Index + 1
    Do Until tempLoop = 0
        If tempIndex >= 12 Then
            tempIndex = 0
        End If
        Cap(tempIndex).Caption = Val(Cap(tempIndex).Caption) + 1
        tempLoop = tempLoop - 1
        tempIndex = tempIndex + 1
    Loop
End Sub

Private Sub Form_Load()
    Dim i As Long
    For i = 0 To (Cap.Count - 1)
        Cap(i).Caption = (i + 1)
    Next i    
End Sub
 

Attachments

Thanks alot covey, thats perfect :)
 
New question added :)
 
zomg no double posting!!!

EDIT: The web browser component won't work for me any more... I think it has something to do with the fact that I finally installed IE7. Sorry, can't help you with this one right now.
 
Code:
Sub InetTest()
      If Inet1.StillExecuting = True Then Exit Sub
      If Len(Inet1.OpenURL("http://google.com")) <> 0 Then MsgBox "Site is up", vbOKOnly, "Simple test"
End Sub
Easiest way I can create, it can get more complex if you wish to check other things but I trust you only want something simple ;) and not professional.
 
I always want simplicity, thanks :)

EDIT: Im not sure that can work because you're seeing if the html is there or not, but when the site is down it still displays a page, with some code in it. And when the site doesnt exist, it takes me to my ISP's page.

Ill try it anyway.

Edit2: Nope, didn't work. =/
 
I think its working.

Ill post back if i find that it isnt.

EDIT: It works for if the website is up or down, but it says the website is up when no website exists due to the source code on my ISP site which i get redirected to.

I need it to say 'invalid website' or something when there is no site. But i have a different isp to other people, so it wont redirect them to the same website in which i am.

Any ideas?
 
bump new question. :)
 
Simple answer: You don't, Excel is for spreadsheets.

Use Access for a database, or SQL and a web based language that can interface with it. (PHP, Ajax, ASP, CFM etc.)

VB6 would just cause more errors then you could deal with at this point in time, but if you are 100% sure you need to use VB6 I guess I could whip something up (or out).
 
Ummm i meant spreadsheet, not a database :S

Sorry my mistake.
 
Runescape Gamblingrunescape gambling
Back
Top