Consulting

Results 1 to 2 of 2

Thread: Size of Files

  1. #1

    Size of Files

    Dear Supporters,

    i did small task in macro "not VBA" to create 10 excel files by name (1.xls 2.xls etc....)
    now in VBA i treat those files (1.xls 2.xls etc....)
    problem some files are duplicated in sizes
    i need formula to do in VBA without open those files!
    if same size of 1.xls or 2.xls or 3 .xls etc..... then msgbox "check extraction files"
    else
    call task()
    end if

    Thank you.

  2. #2
    VBAX Mentor
    Joined
    Aug 2012
    Posts
    367
    Location
    Hi your actual question is rather unclear, but some thoughts for you are:

    what can you get out of
    Set myObject = Application.FileDialog(msoFileDialogOpen)
    ?

    I've used this to specify a file without opening it as per
        With myObject
            .Title = "Choose File"
            .InitialFileName = myPath & "\"
            .AllowMultiSelect = False
            If .Show <> -1 Then
                MsgBox ("No File Selected")
                Exit Sub
            End If
            fileSelected = .SelectedItems(1)
        End With
    Remember: it is the second mouse that gets the cheese.....

Posting Permissions

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