Found the problem!
It was, I think what is technically called an 'ID10T error', a stuff up on my part (I had failed to notice that in Sub A() there was an Exit Sub statement before gtsLog was set to the textstream, so gtsLog was never actually set, and the initial WriteLine statement, the one...
I am having trouble using the WriteLine method to write out to a textstream:
The code is as follows:
Global gFSO as New FileSystemObject
Global gtsLog as TextStream
In a different module:
Private Sub A()
...
Set gtsLog = gFSO.OpenTextFile(<path>, ForAppending, True, TristateFalse)...
I am developing a Contacts Database application for a client, initially I used MS Access as the database, but I would now like to port across to MS SQL Server. The client's server is running MS Windows Small Business 2003 Server, which appears to have SQL Server 'built into' it.
However, I cant...
Correction to the above post, the database I am attempting to connect to is an Access 2007 one, not Access 2010, but that was just a typo, the problem remains.
I am attempting to connect to an Access 2010 database using a Microsoft Data Link (a .udl file). I have password protected (encrypted) the Access 2010 databse.
Within the Data Link, I specify:
Provider: "Microsoft Access 12.0 Access Database Engine OLE DB Provider"
Connection: Data Source...
Using VB (actually VB6) I am opening a tab deliminated .TAB file with Excel 2007, making a few small changes and then attempting to save it as a .xlsx file.
The code looks like
XLWorkBookName = xlApplication.Workbooks.Open(filename.TAB)
...
XLWorkBookName.SaveAs filename.xlsx, xlWorkBookNormal...
Thanks, SkipVought, I was aware that I would need to specify the dates differently. And I am aware that you Americans represent your dates differently to just about everyone else in the world.
But what you have not told me is how to do it in Excel, i.e where do I put the SQL like string? And...
I am using Excel 2007.
Is it possible to set up a filter using SQL style syntax.
e.g. say I have a large worksheet of data that contains columns named 'Date' and 'Rego' (among many others), can I set up a filter something like this:
SELECT <rows of workbook> WHERE Date >='01/06/2010' AND Date...
I am having trouble with Outlook 2007 on a Win XP Pro machine, after starting Outlook issues the following message:
"The required file naCmnLib.dll cannot be found in your path. Install Microsoft Office again."
Do I really need to re-install Office? Can't I just copy in the missing file? If I...
I have encountered the following problem trying to start Outlook 2007 on a Win Vista machine, I get this message:
"Cannot start Microsoft Office Outlook. Cannot open the Outlook window. Invalid XML, the view cannot be loaded."
I ran Office diagnostics but that did not fix the problem. I assume...
Attempting to start MS Outlook 2007 on a Vista machine results in this error:
"Cannot start Microsoft Office Outlook. Cannot open the Outlook window. Invalid XML, the view cannot be loaded."
I assume there must be some XML file that Outlook reads at startup, which has become corrupted. Any...
The situation is this: there are two PC's, the old one, a WinXP machine using MS Outlook 2003 as the e-mail program; and a new one, a Win7 machine onto which I downloaded Win Live Mail to use as the e-mail program.
The user wishes to transfer everything in Outlook across to Win Live Mail on the...
Yes, thanks, it did better than help, it gave me a whole new idea on how to approach the problem: Instead of adding my code to the BeforeClose method and worrying about whether the workbook had been saved or not, I just added my code into the BeforeSave method. That way my code executed every...
Using Excel 2003, can I detect if the open workbook has been changed in the BeforeClose method. i.e something like:
if activeworkbook.hasbeenchanged then
<do something>
else
<do something else, probably nothing>
end if
Thanks, Steve.
Thanks, but you really think I didn't search the KB?
If you take the time to read the file behind the link posted above it will inform you that you need the CD to uninstall, I don't have one.
I am tidying up a friends HDD, they have 580 MB stuffed up with Office 97 which they don't use any more. When I try to uninstall Office 97 using Add/Remove Programs it prompts for the installation CD (why?), they have lost their CD, can I uninstall without the CD? Is there a utility somewhere...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.