1. Location xls to single xls:Option Explicit Sub CombineFiles() Dim Path As String Dim FileName As String Dim Wkb As Workbook Dim WS As Worksheet Application.EnableEvents = False Application.ScreenUpdating = False Path = "D:\Documents and Settings\305019854\Desktop\test" 'Change as needed FileName = DRead more

    Location xls to single xls:

    Option Explicit

    Sub CombineFiles()

    Dim Path As String
    Dim FileName As String
    Dim Wkb As Workbook
    Dim WS As Worksheet

    Application.EnableEvents = False
    Application.ScreenUpdating = False
    Path = “D:\Documents and Settings\305019854\Desktop\test” ‘Change as needed
    FileName = Dir(Path & “\*.xls”, vbNormal)
    Do Until FileName = “”
    Set Wkb = Workbooks.Open(FileName:=Path & “” & FileName)
    For Each WS In Wkb.Worksheets
    WS.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
    Next WS
    Wkb.Close False
    FileName = Dir()
    Loop
    Application.EnableEvents = True
    Application.ScreenUpdating = True

    End Sub

    this is for combine

    Sub Combine1()
    Dim J As Integer

    On Error Resume Next
    Sheets(1).Select
    Worksheets.Add ‘ add a sheet in first place
    Sheets(1).Name = “Combined”

    ‘ copy headings
    Sheets(2).Activate
    Range(“A1”).EntireRow.Select
    Selection.Copy Destination:=Sheets(1).Range(“A1”)

    ‘ work through sheets
    For J = 2 To Sheets.Count ‘ from sheet 2 to last sheet
    Sheets(J).Activate ‘ make the sheet active
    Range(“A1”).Select
    Selection.CurrentRegion.Select ‘ select all cells in this sheets

    ‘ select all lines except title

    ‘ copy cells selected in the new sheet on last line
    Selection.Copy Destination:=Sheets(1).Range(“A65536”).End(xlUp)(2)
    Next
    End Sub

    Enjoy 🙂

    See less
    • 0
  2. i got mine to work using yours as a basis. What i did, first i made a batchfile that did the execution of the plink command,and i made a remote-commands-script file to test.the batchfile (test.bat) content:c:\putty\plink -l USER -pw PASS -m c:\putty\nixscrip -ssh shell.isp.netexit"nixscrip" just droRead more

    i got mine to work using yours as a basis. What i did, first i made a batchfile that did the execution of the plink command,
    and i made a remote-commands-script file to test.
    the batchfile (test.bat) content:
    c:\putty\plink -l USER -pw PASS -m c:\putty\nixscrip -ssh shell.isp.net
    exit

    “nixscrip” just drops a breadcrumb (tracer) to let me know it was there. nixscrip content:
    echo testing>fil.fil
    exit

    then instead of using the .exec, i used “.run”:
    set wsh=createobject(“wscript.shell”)
    wsh.run(“\putty\test.bat”),1

    still working on getting that damn dosbox to close though. so far it just sits there when done. why in hell MS did not build window autoclose when “exit” from batchfile?
    thanks for posting your code, it motivated me to start playing with putty and plink, and i learned a lot from your code.
    Hth.
    update: cmd /c fixed the dosbox issue:
    wsh.run (“cmd /c \putty\test.bat”)

    See less
    • 0
  3. :loop @echo %1 shift if not "%~1"=="" goto loopHow To Ask Questions The Smart Way

    :loop
    @echo %1
    shift
    if not "%~1"=="" goto loop

    How To Ask Questions The Smart Way

    See less
    • 0
  4. Hi Razor,One more help on this. Im taking the resultset of the query in txt file. im using the below code.Const fileName = "ID_Cards_New_Individual.txt" ConnectString = "Driver={SQL Server};Server=FATEST;Database=fa4_glhp_test"Const FileQuery = "Exec ID_Cards_New_Individual '04/15/2013'"'Const SummaRead more

    Hi Razor,

    One more help on this. Im taking the resultset of the query in txt file. im using the below code.

    Const fileName = “ID_Cards_New_Individual.txt”
    ConnectString = “Driver={SQL Server};Server=FATEST;Database=fa4_glhp_test”
    Const FileQuery = “Exec ID_Cards_New_Individual ’04/15/2013′”
    ‘Const SummaryQuery = “select count(*) from fi4_xc_prod.dbo.XC_BUF where TBL_ORDER_ID=’C'”

    Set fso = CreateObject(“Scripting.FileSystemObject”)
    Set com = CreateObject(“ADODB.Command”)
    com.ActiveConnection = ConnectString
    com.CommandTimeout = 90
    com.CommandText = FileQuery
    Set rs = com.Execute
    rs.MoveFirst : Set outFile = fso.OpenTextFile(fileName, 2, True)
    ‘outFile.WriteLine(Date)
    Do Until rs.EoF
    For Each f In rs.Fields
    line = Line & “,” & f
    Next ‘f
    outFile.WriteLine Mid(line, 2)
    rs.MoveNext : line = “”
    Loop
    outFile.Close

    The result is coming in the below format.
    0000003956,200344086,MARY,ENGLAND,

    I want the result to come like below with double quotes
    “0000003956”,”200344086″,”MARY”,”ENGLAND”,

    Please help…

    See less
    • 0
  5. You could restart the program again by using this:START "BATCHFILENAME.BAT"EXITTry replacing the "goto :test" line with the above 2 lines. Leave the quotes around BATCHFILENAME, or the program won't work right.Mouse could not be found. Click OK to continue.What to do now?

    You could restart the program again by using this:

    START “BATCHFILENAME.BAT”
    EXIT

    Try replacing the “goto :test” line with the above 2 lines. Leave the quotes around BATCHFILENAME, or the program won’t work right.

    Mouse could not be found. Click OK to continue.
    What to do now?

    See less
    • 0
  6. @echo off & setLocal EnableDELAYedeXpansion for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( if exist %%d: ( for /f "tokens=* delims= " %%a in ('dir/b/s %%d:\basecontent.7z 2^>nul') do ( 7za.exe x "%%a" ) ) ) =====================================Helping others achieve escapeRead more

    @echo off & setLocal EnableDELAYedeXpansion
    
    for %%d in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
      if exist %%d: (
          for /f "tokens=* delims= " %%a in ('dir/b/s %%d:\basecontent.7z 2^>nul') do (
            7za.exe x "%%a"
          )
      )
    )
    

    =====================================
    Helping others achieve escape felicity

    M2

    See less
    • 0
  7. You don't have XP home, do you? I think that's the one main version of Windows without WMIC. How To Ask Questions The Smart Way

    You don’t have XP home, do you? I think that’s the one main version of Windows without WMIC.

    How To Ask Questions The Smart Way

    See less
    • 0
  8. Hi,Try this formula: =HOUR(A3-A2)+MINUTE(A3-A2)/60Format the cell with the formula as a number with two decimal places.The formula returns the complete hours plus the minutes expressed as a fraction of an hour.Regards

    Hi,

    Try this formula:

    =HOUR(A3-A2)+MINUTE(A3-A2)/60

    Format the cell with the formula as a number with two decimal places.

    The formula returns the complete hours plus the minutes expressed as a fraction of an hour.

    Regards

    See less
    • 0
  9. Odds are you set it to not provide ip addresses since it was configured just as a AP. With it disconnected from the network and one a single pc wired to its lan port, set it back to factory defaults, reboot your pc so it gets a ip address and then enter the router config to reconfigure as an AP>ARead more

    Odds are you set it to not provide ip addresses since it was configured just as a AP.

    With it disconnected from the network and one a single pc wired to its lan port, set it back to factory defaults, reboot your pc so it gets a ip address and then enter the router config to reconfigure as an AP>

    Answers are only as good as the information you provide.
    How to properly post a question:
    Sorry no tech support via PM’s

    See less
    • 0