Posts

Es werden Posts vom Oktober, 2008 angezeigt.

DOT and TXT Open!

Open a new Worddokument based on a DOT. Open several (Multiselect=True) text files with Notepad - CTRL key hold and files select. Harddrive and path are adjusted before. The files at the end of the article are Excelfiles of the version 2003 and 2007.
The following code belonged In "Module1"

Option Explicit
PublicSub Open_DOT()
Dim varFile AsVariant
Dim dblTMP AsDouble
varFile = Application.GetOpenFilename _
("DOT Files (*.dot), *.dot")
If varFile =FalseThenExitSub
dblTMP =Shell("""winword.exe"""&" /t"& varFile,3)
EndSub
PublicSub Open_TXT()
Dim intNumber AsInteger
Dim varFile AsVariant
Dim dblTMP AsDouble
ChDrive("E")'adapt
ChDir("E:\Excel")'adapt
varFile = Application.GetOpenFilename _
("TXT Files (*.txt), *.txt",,,,True)
IfNotIsArray(varFile)ThenExitSub
For intNumber =Lbound(varFile)ToUbound(varFile)
dblTMP =Shell("""notepad.exe"""&_
" &quo…

Excel - ACCESS - Excel!

In the following examples a data base (ACCESS mdb) is provided. Then a table and several columns are provided. Subsequently, data are provided, changed, deleted and exchanged. Explanation and structure in the example files. Importantly - pay attention to reference! The files at the end of the article are Excelfiles of the version 2003 and 2007.
The following code belonged In "Module1"

Option Explicit
'Clicking on Tools, then References.
'Inside of this window, you'd enable
'Microsoft ActiveX Data Objects X.X Library
'and
'Microsoft ADO Ext. X.X for DLL and Security
Private Declare Function ShellExecute Lib "Shell32.dll"_
Alias "ShellExecuteA"(ByVal hwnd AsLong,_
ByVal lpOperation AsString,ByVal lpFile AsString,_
ByVal lpParameters AsString,ByVal lpDirectory AsString,_
ByVal nShowCmd AsLong)AsLong
Public Declare Function SetForegroundWindow Lib "user32"_
(ByVal hwnd AsLong)AsLong
PrivateConst SW_MAXIMIZE =3
PublicSub DataBase_1()