Invoke Unix Script With VBA
Nov 28, 2006
Is it possible that i can execute a Unix C-shell script named "get_summary" and after executing it, it will generate a file named xxx.asc ?
I have added on a statement :
A.writeline "get_summary" 'To execute a script
but i can;t seem to get the csh script to run. Pls help. Thanks again in advance
Dim userinput As Variant
userinput = "xxx.asc"
Set fs = CreateObject("Scripting.FileSystemObject")
Set A = fs.CreateTextFile("c:script.txt", True)
A.writeline "open 10.10.10.10"
A.writeline "xxx" 'username
A.writeline "xxxxxx" 'password
A.writeline "cd /export/home/tae/scripts" 'directory on FTP site
A.writeline "get_summary" 'To execute a script
A.writeline "ascii"
A.writeline "get " & userinput 'file to be uploaded
A.writeline "quit"
A.Close
View 5 Replies
May 28, 2012
I am trying to get some data on a excel. This data is available on a unix OS solaris server.
The data is available in tabular format on the txt file in the server and i need to populate this data on my excel sheet.
How to connect to unix from excel and how to get the data.
View 1 Replies
View Related
Mar 19, 2007
What I have is a csv file that was generated in a unix program and a plain text file generated by a windows application. The text file identifies which lines in the csv files contain an error (not an excel error, an error in a 3rd party program). What I need to be able to do is compare both files in VBA and output to text a csv file containing only the errors then output to excel a count of the errors. the code I use is:
Sub extbyconnum()
Application. ScreenUpdating = False
Dim IOame As String, _
FName As String, _
OName As String, _
INum As Integer, _
FNum As Integer, _
ONum As Integer, _
InputLine As String, _
CCnt As Long, _
DCnt As Long, _
iline As String, _
ichar As String, _
cons() As String, _.......................
View 2 Replies
View Related
Aug 15, 2006
Is it possible to create a hyperlink for a cell to display a textbox that enables the user to input a specific cell value that will autofilter a worksheet to pull up only the rows that is related to that value?
View 5 Replies
View Related
Mar 19, 2009
I have created a VB User form in Excel. I have a value in Cell A1. On clicking the cell, the user form has to be invoked. I do not find a way to do this using HYPERLINK function. If I use a label in that cell, I am able to implement it. But I may want to sort the excel cells and in that case the label idea will not work out!!!!
View 3 Replies
View Related
Feb 7, 2013
I have a code that looks fetches all names of the worksheets in a workbook and lists in a master sheet.
[Code
Sub Button1_Click()
Dim ws As Worksheet
Dim x As Integer
Dim lr As Long
x = 2
lr = Worksheets("Totaliser").Range("A1").End(xlDown).Row
Worksheets("Totaliser").Range("A2:A" & lr).Clear
[code].....
This works fine collecting all of the named sheets but is there a way of me invoking a 2nd procedure to count the number of rows within each worksheet that contain line items which are updated at the beginning of each month. Placing them into the next column (B) to the right of the sheet names.
All worksheets contain a header Row (1) so the count function would if at all possible count from the 2nd Row to the end.
I have tried different lines of code but just get errors.
The code above places the first sheet into cell A2 and then down respectively
View 2 Replies
View Related
Nov 23, 2013
I am new to excel macro. Want to invoke a page and click on submit button. Getting "Object doesnt support this property or method" error on the line "Subm.Click"
My code is,
Sub Macro1()
Dim IE As Object
Dim URL As String
Dim Subm As Object
URL = Range("B3")
[Code] .........
View 1 Replies
View Related
Oct 4, 2013
I have a spreadsheet of device names and IP addresses. I want to be able to click on an IP address and have it automatically invoke A SSH program ( putty.exe ) to automatically login to the device.
View 1 Replies
View Related
Aug 27, 2009
I'm looking to get a macro (or other trick) to count differences in words between two strings.
For example, these twostrings:
“Hi there John, this is Dave”
versus
“Hi where, this is old Dave”
Have THREE differences (at the word level) in this example. All I really need to know is how many total words are different: deleted, substituted, or added.
View 9 Replies
View Related
Feb 7, 2006
I want to Hide a range of rows (16:18 in this example) if "no" is in a range
of cells and Unhide the same range of rows if "yes" is in the same range of
cells. The "Hide", "Unhide" macros (below) work if I select one from the Run
Macro list, of course. But, how can I call for it to run from an "IF"
function. I know this statement is wrong, but it may help you know what I am
looking for: =IF (A1:A15="no",Run Hide,IF (A1:A15="yes",Run Unhide),"")
Sub Hide()
Rows("16:18").Select
Selection.EntireRow.Hidden = True
End Sub
___________________
Sub Unhide()
Rows("16:18").Select
Selection.EntireRow.Hidden = False
End Sub
View 11 Replies
View Related