Search results

  1. E

    Remove letters from ordinal numbers within a string??

    Or look for numbers (using a CHR range) in the string and delete the following two characters if there are any?
  2. E

    Nulls and Visual Basic

    I had a similar problem when importing data. Instead of creating a table upfront in VBA and setting the properties and default values, I just imported the data, and then updated it. Maybe this is the problem as well?
  3. E

    Nulls and Visual Basic

    Try this strColumn is the number of columns in your table. In this case I tested with 2 (0 To 1) change to your table size Sub Update_To_Zero() Dim db As Database Dim rst As Recordset Set db = CurrentDb Set rst = db.OpenRecordset("YourTableNameHere") With rst If .RecordCount <> 0 Then...
  4. E

    Attention boblarson

    I did a bit of copy/paste from Excel to save time and this slipped thru. Would like to have pasted the code, but it's too large, even for a zip file. I'm going to write a snippet in future to validate the Excel code portion for non-explicit references. Despite going thru the code for 3 days, I...
  5. E

    Attention boblarson

    I have it working, but then I got random results, with the Excel app not finishing the pivot table creation properly all the time. The problem was COMPLETION_xlWBa.Worksheets("Sheet3").PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _...
  6. E

    Attention boblarson

    Hi I had to do a 'SaveAs'. Doing the '.close true' did not remove the Excel App from Task Manager. Code changed from COMPLETION_xlWBa.Close True Set COMPLETION_xlWBa = Nothing COMPLETION_objExcel1.DisplayAlerts = True COMPLETION_objExcel1.Quit Set COMPLETION_objExcel1 = Nothing to...
  7. E

    Enter Username and return Computer name

    Sorry, the users do not have MS Access on their PC's. I am writing a program to harvest the computer name based on the username of people who are currently logged into the machine, based on a table of usernames in Access. The one thing I can guarantee is that explorer (Windows Explorer, not...
  8. E

    VBA: accessing the applications name on the taskbar

    Apologies, I was hoping to do it via WMI, but the cmd will work just fine. Am just frustrated because MS did not add a caption or applications property to WMI as I use it elsewhere, and like to keep the code clean. Once again thanks.
  9. E

    sending email using dynamic body text

    Here is another way to send straight to server without using a mail program. Public Function Emailer(strTo As String, strSubject As String, strBody As String,StrAttachment as string) Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") iConf.Load -1...
  10. E

    Attention boblarson

    Hi, I believe you had a similar problem. Manipulating Excel, I get an Excel process which I can't shut down. All the references to close the file and quit Excel are there, and they are set to nothing. Everything is explicity referenced so there should be no instance hanging. I use similar code...
  11. E

    Enter Username and return Computer name

    I have a list of usernames and wish to see what computers they are using on the lan. How do I return the list of computer names? From this I should be able to see who is running explorer.exe to get their username? All the code I can find only works on my computer and not over the lan.
  12. E

    VBA: accessing the applications name on the taskbar

    Not what i wanted, but thanks for the help
  13. E

    VBA: accessing the applications name on the taskbar

    Here is the code to list the processes in Windows Task Manager. However I want to list the Applications in Windows Task Manager. Public Sub showProcesses() Dim W As Object Dim ProcessQuery As String Dim processes As Object Dim process As Object Set W = GetObject("winmgmts:") ProcessQuery =...
  14. E

    VBA: accessing the applications name on the taskbar

    Hi Tried WMI but could not find the file name, I can pull back every thing else. Do you know what the WMI property is? I looked at the properties on the Microsoft site, and it doesn't seem to have one to return a filename or even a way of determining the filename.
  15. E

    VBA: accessing the applications name on the taskbar

    Correct, they are files. I am NOT looking for the application (Excel) but the file (MyExcelFile.xls) for example. I run VBA code to manipulate files in Memory without opening them. However if they are open on the PC (which can be from various file locations but could have the same file name) I...
  16. E

    VBA: accessing the applications name on the taskbar

    Can be any file. I run an application that manipulates excel, word and text files. However I want to ensure that if a file with the same name is open on the PC, I can close them before opening the new ones. I remember years ago doing this with a few lines of code, but can't find it now.
  17. E

    VBA: accessing the applications name on the taskbar

    Hi Despite trawling the web and this site, I can't find a simple way to return the name of the programs on the taskbar. :banghead: The reason is I can have many instances of an application running such as Excel, opened from different sources. I need to determine if a specific file is open...
  18. E

    if else statement

    See if this is what you are looking for. I have tried to duplicate what you described, otherwise I will need snapshots of the tables and queries and some of the data
  19. E

    if else statement

    No, If I understand Col 10 is Col4-Col9 and you want Col4 to be based on the value in Col10. You are creating a circular reference. Maybe you can explain a little clearer?
  20. E

    NZ function not recognised

    Answered my own question. It can only be used if the other grouped fields are also not null. I was doing a count of the date and trying to show the date, but when the date is null, Nz appears not to work.
Back
Top Bottom