Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    controll on flopy (2000 sr.1)

    this is a part of main code.
    Many problem:
    (Note:for test script i have used c
    The official file to import is located in a:REGIONE.02

    Problem 1)
    Insert a control befere to start macro if the floppy inserted in to a drive. (Make appear a msg box "attention no disk in to drive, insert one!")
    Problem 2)
    If the first condition is estabilished, make a control on the floppy if contain the file REGIONE.02, if not make appear a msg box "The floppy not contain REGIONE.02, insert another disk!"

    after the relative controll go to next line of macro and continue routine...

    ================================================== ==


    Sub REGIONE_DISK()
    Set Elenco = Worksheets("REGIONE_DISK")
    n = FirstFree("REGIONE_DISK", "A", 2) 'Record iniziale per il riempimento del tabulato
    iFile = FreeFile()

    NomeFile = "C:EPFREGIONE.02"
    'Ciclo apertura file di testo

    Open NomeFile For Input As #iFile

    Do Until EOF(iFile)
    Line Input #iFile, Record_Corrente$

    If Mid(Record_Corrente, 30, 1) = "." Then

  2. #2
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: controll on flopy (2000 sr.1)

    Sub CheckFloppyForFile()
    Dim strName As String

    On Error Resume Next
    strName = Dir("A:*")
    On Error GoTo 0

    If Len(strName) = 0 Then
    MsgBox "No Floppy"
    ElseIf strName <> "REGIONE.02" Then
    MsgBox "Wrong Disc"
    Else
    MsgBox strName
    End If

    End Sub

    Jim Cone
    San Francisco, CA

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: controll on flopy (2000 sr.1)

    TKS FOR YOUR HELP!
    I attache my file, do you like to correct my code with your modify... (i have modify the code but recieve another result....?!)

    And on the same file, why if i insert =SOMMA(G3:G4) in G1 in the sheet REGIONE_GOT i recive "0"????
    But if i insert =SOMMA(G3+G4) the formula work?

    Tks

  4. #4
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: controll on flopy (2000 sr.1)

    I don't believe I will be able to help you.
    I cannot find any code that interrogates the drives so I can't tell what is wrong with non-existent code.
    Also, it is generally better to copy files from the floppy to the hard drive and work from the hard drive copy.
    Working from the floppy can be unreliable.

    As to summing G3 and G4...
    Once I change the decimal and digit grouping symbols to U.S. version then the two cells can be added.
    Perhaps the cells are formatted as text when you are working on them?
    Also, use "= G3 + G4" not "= Sum(G3 + G4)"

    Perhaps, someone else can more helpful.

    Jim Cone
    San Francisco, CA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •