Open Hyperterminal In Code
Oct 7, 2007
I can use the following code to open Notepad from Excel Vba:
Dim retval
retval = Shell("NOTEPAD.EXE " & Filename, vbNormalFocus)
how to open Hyperterminal using the above method. I tried
Dim retval
retval = Shell("hyperterminal.EXE " & Filename, vbNormalFocus)
View 3 Replies
ADVERTISEMENT
Jan 27, 2009
I use excel 2002 but some of my office are on 97, i want to add a small workbook open event code which works for me but debugs for the others?? The code is basically, go to a tab, on that tab and that range sort..
View 2 Replies
View Related
Apr 28, 2009
I need to error check to see if a worbook is open or not. if it is not open i need it to open it. i supplied the code i am trying but it is not working. I keep all my workbooks in XLSTART.
View 2 Replies
View Related
Nov 16, 2006
I could need a code (WS code I assume) that open the sheet in 70% zoom every time I open that sheet. For now I get in 75% every time I open it. I guess that WS code will bypass that default setting, or bug, or what ever resets it 75%.
View 9 Replies
View Related
Mar 5, 2010
I am trying to write a macro that Copies the last row of data in one sheet and Pastes it into the first open row. I'm assuming I can't do it with the macro recorder because I wouldn't be specifying the last row and first row. Does anyone know what the code might be for these actions
View 9 Replies
View Related
Sep 11, 2007
In the attached file, I have a code to open several files which have the same format, sheet name. The copy and paste the contents to the attached file.
It’s ok to open the first file. But it got problem to open the remaining file. The warning says it can not find the file name even the file exits.
View 3 Replies
View Related
Mar 12, 2014
I have a macro to get copy of sheet named "Doc Info" from workbook File 1 to active workbook.
I could do it for one file on any active workbook.
But what I would require is, upon executing this macro , i want this macro to get executed in all open workbooks( could be any numbers ).
I want to move copy of sheet from File 1 to all open workbooks ( which i am doing it manualy for every file )
All these open workbooks could be from any folder , wont be in same folder.
So logic is to execute my macro apply in all open workbooks in my computer.
Below is the code and i have attached file for test
HTML Code:Â
Sub Copysheet()
Dim wSht As Worksheet
Dim wBk As Workbook
Dim wBk1 As Workbook
Set wBk = ActiveWorkbook 'Workbooks("File 2.xls")
Set wBk1 = Workbooks("File 1.xlsm")
Set wSht = wBk1.Sheets("Doc Info")
wSht.Copy before:=wBk.Sheets(1)
End Sub
View 2 Replies
View Related
Sep 14, 2008
this is a bit of the code that should open a file, but the thing is tha I am trying to open a shortcut file. not a normal one. so I alway get an error that say tha tis not possible to locate the file. does any body knows how should I do to open the shortcut file?
View 4 Replies
View Related
Feb 16, 2010
I have Created an Excel Spreadsheet to work as a EPOS system. The only Problem i am having finishing it off is getting the cash Drawer to open at the end of a sale.
I have my Cash Drawer connected via a Rj 45 in the Back of my Receipt Printer. The Printer i have is a Star Tsp-600. I have Found out that the Open Drawer Codes are 7 or 27,7,10,50,7. I am not entirly sure what they mean though. The code that i have at the moment doesnt work it brings an error "53" file not found. This is my code
View 3 Replies
View Related
Jan 17, 2013
I have a sheet which i made ages ago and cant remember my pw. I can goto the alt, F11 select the macro and run it which i have set from all sheets to hide, and i can change the wording on the sheets but i cant open the code.
Does this mean i will have to forget about it unless i remember the pw?
View 1 Replies
View Related
Mar 23, 2014
I have this code...
Code:
Sub Macro1()
'
Sheets("Log").Select
Range("F1").Copy
For Each wb In Workbooks
If wb.Name Like "Test Book*" Then
wb.Activate
Sheets("Data").Select
Range("O2").Select
ActiveSheet.Paste
[code].....
can't get it to work properly...Basically I want the code to copy the date in cell F1 of the 'Log' sheet in Workbook 'Main' - then goto an open Workbook called 'Test Book' (note: this Test Book is a partial string name used hence the other code around it) and paste the copied date into cell O2 in sheet 'Data'
Using this pasted date in cell O2 carry out the required filter function.
The copy/paste of the date from my Workbook Main to Test Book isn't working so the code then shows error when trying to filter the data using the pasted date.
View 4 Replies
View Related
Jan 21, 2009
below code
Sub Collect_OS_Data()
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Dim fso As Object, fld As Object, fil As Object, fldPath As String, wbSrc As Workbook, wbCur As Workbook
fldPath = "Q:PublicPAYMENTS Q&RREPORTSSuspense Activity BUSINESSOngoing - Suspense BUSINESS - Activity Reports"
Set wbCur = ActiveWorkbook
ActiveSheet.Name = "Raw Data"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.getfolder(fldPath)
On Error GoTo ErrHandler
For Each fil In fld.Files
This opens all spreadsheets within a folder and takes the data i require out of each one and pastes to a new workbook, however the files are password protected. Can you add into the code to open each spreadsheet as a readonly copy and paste data and then close without a save prompt or denying the save prompt ?
View 9 Replies
View Related
Aug 11, 2004
how to open a pdf file (located: "C:myfile.pdf") in macro code?
View 4 Replies
View Related
Jul 15, 2006
Does anyone know code to bring up a comments box automatically when a certain word is entered into a cell? I have an If statement but I just don’t know how to open a comments box in the same cell.
View 4 Replies
View Related
Oct 4, 2006
I tried testing, msgbox displays the correct last modified file "MMO Activity Report 09-29-06.xls" in path D:MMOWorkfile but I was not able to open the workbook.
Sub testGetNewestFile()
MsgBox NewestFile("D:MMOWorkfile", "*.xls")
Workbooks.Open (NewestFile("D:MMOWorkfile", "*.xls"))
View 9 Replies
View Related
Jan 11, 2007
I have a read only excel file which I want to interrogate in another report.
I'm writing some code to open the file but I'm not sure how to get past the password/read-only prompt when opening the file.
My code is:
Workbooks.Open Filename:= "C:Sales2006.xls"
I assume it's possible to write some code to get past the prompt. I have checked the help files which do seem to indicate it's possible to specify a read only property but it doesn't say how.
View 5 Replies
View Related
Apr 22, 2007
I need vba code to open a HTML file when i click a button in microsoft excel.
View 2 Replies
View Related
Feb 24, 2008
I have been looking for some VBA code that simple, when it runs, opens a browser and a specific, hard coded website. Is this possible in VBA?
View 2 Replies
View Related
Mar 5, 2008
I am currently using the following code in order to open a web page by clicking a button:
Private Sub Timetable18_Click()
ActiveWorkbook.FollowHyperlink Address:="http://journeyplanner.tfl.gov.uk/user/AHF/JP15__00006e8e.pdf"
NewWindow = True
End Sub
However, when this is executed it returns the following error:
Run-time error '-2146697210 (800c0006)':
Method 'FollowHyperlink' of object '_Workbook' failed
Clearly, I'm doing something wrong. I wondered if it had anything to do with the fact that the webpage I'm trying to open is a pdf and not html or similar, but this doesn't appear to be the issue.
View 4 Replies
View Related
May 12, 2008
I am trying to write code to open a new (blank) workbook while in an existing workbook (I am then going to pass data between the two which is easy). When I try to record the code to get the syntax for opening a new workbook it will not record any code. I also need to name the new workbook based on text in a cell in the existing workbook. I just saw before posting this that the code;
workbooks.add
will open a new workbook now I just need to name the new workbook based on text in my existing workbook.
View 2 Replies
View Related
Jan 16, 2013
I have received several hundred "Excel" data file dumps from an unspecified corporate database ( SAP? ). They are nominally spreadsheets, that is they are tables of mixed data that Excel recognizes, as they are exported from the database as such.
I'd like to walk a directory containing these files, and only these files, open each in turn save them as proper Excel files and close them. The end goal is to import these tables into a Access database, but Access doesn't recognize them either. I also need to repair values in one field which is easier to accomplish in Excel.
Unfortunately, opening the file generates an error I've been unable to trap, due to the fact the excel thinks its an HTML file, which it is, and wants me to verify that I do want to open it. Similarly, I receive a message when I try to save the file that requires me to nominate an acceptable Excel file type, which I can do in code.
View 4 Replies
View Related
Feb 26, 2014
Two workbook, A & B. Code in B copies some data over to a sheet in workbook A.
It does this not problems if A has remained open, but if it has just been opened, I get a "subscript out of range" error at the "With Workbooks" line.
The bit in red is what I have recently added to allow workbook A to be closed unless needed. Since adding this, the debug error has emerged, even though there was no problem when workbook A remained permanently open.
View 3 Replies
View Related
Mar 11, 2008
I'm trying to write a macro that will bring up the "File Open" dialog box, and allow the user to navigate to the directory where the file is located. It won't be the same file every time, and the files will likely have different names.
View 14 Replies
View Related
Nov 26, 2008
I am writing some code to open up a file and use the text import as the files are data files. i currently have
View 4 Replies
View Related
Mar 26, 2009
I recorded a Macro to open a specific sheet and it works fine however I want to go to the next step and have the sheet open to a specified column in the sheet based on the column in cell 'H2' on the current sheet.
View 13 Replies
View Related
May 29, 2014
I need a code which will open up a previous days file. I have the code to pick the correct file but I am stuck because the folders are multiple levels down to year then month.
Eg. Folder Name > YYYY > Month
So i need to have a code which can look in to the relevant folder based on the current date and then be able to open the file i need.
I.e. today is 29May so i need the code to open the 2014>May folder.
For 1st day of month I would need it to open last months folder I.e. 01June Open May folder
View 2 Replies
View Related
May 17, 2007
In my first workbook I select an area to copy/paste into a new wb with this code (from the board)
[Set source = Range("A55:K109").SpecialCells(xlCellTypeVisible)
Dim FName As String
Dim VBComp As VBComponent
Dim wbnew As Workbook
Dim x As String
Set wbnew = Workbooks.Add
Set dest1 = ActiveWorkbook
dest2.Activate
With ActiveWorkbook
FName = .Path & "code.txt"
If Dir(FName) "" Then
Kill FName
End If
For Each VBComp In .VBProject.VBComponents
If VBComp.Type vbext_ct_Document Then
VBComp.Export FName
wbnew.VBProject.VBComponents.Import FName
Kill FName
ElseIf VBComp.Name = "ThisWorkbook" Then
If VBComp.CodeModule.CountOfLines > 0 Then
wbnew.VBProject.VBComponents
The complete code in this workbook sends the entire workbook to one person and it creates a new workbook and pastes a range and the VB code needed to run the button it copies and sends this to another person.
The codes runs excellent in 2003. In 2007 I can get the entire workbook to send to the first person, but
The email to the second person will send, but they can not open the workbook. I get the error "File Format or file extension is not valid. Please verify file is not corrput and that extension matches file.
I know trust access to visual basic has to be enabled in 2003 for this code to run, so in 2007 I went to the Excel options trust center and clicked the box which says Trust access to the VBA project object model.
When I step through this code everything looks great. The worksheet area is correct, the button is copied, the code can be seen in the properties window, but then I get the email and it will not open.
There is even a line of code that kills the file after the mail is sent (temporary saving location is the desktop). So, I used a ' and made it a comment line so I could try to open the file from my desktop. It will not open there either. File extension being used is .xlsm
View 9 Replies
View Related
Jul 31, 2007
I want code to:
Open EstimatingSheet.xls
SaveAs current workbook as Range B13 &".xls"
Open EstimatingSheet.xls workbook from somewhere on C:
Then close the one with B13.xls
View 9 Replies
View Related
Jun 5, 2009
I have files saved as a code, then a customer name. I'm trying to write some more code to open the file only based on the initial code.
For example the file name is X090000 TEST
This doesn't work;
Open("V:\\\" & oldFileName & "*" _
& ".doc")
View 9 Replies
View Related
Aug 8, 2007
I am trying to write code in the VB behind Excel that will allow me to navigate to an excel file (can be open or closed) and delete it. ie navigates to file xxx.xls at N:/xxx/xxx/ selects the file and then deletes it.
View 4 Replies
View Related