Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by brucegn

  1. brucegn

    If Statement with Between

    You could use If (txtCode >= 1000 And txtCode<= 1999) Then DoWhatever Else DoSomethingElse End If
  2. brucegn

    Loop to trap error goes on True or False?

    See this thread by SkipVaughn, I think it may help you to do what you want http://www.tek-tips.com/viewthread.cfm?SQID=862943&SPID=707&page=1
  3. brucegn

    Loop to trap error goes on True or False?

    If you want to trap the error you will need to get rid of the "On Error Resume Next", you are telling the procedure to just continue regardless of what happens.
  4. brucegn

    VISUAL BASIC WORKBOOK BEFORE SAVE EVENT

    Without seeing the code you are currently using it is hard to see what may not be working for you. But this should help you in the direction. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Cancel = (Range("A1") <> 1) If Cancel Then MsgBox "Workbook Cannot Be...
  5. brucegn

    Format problems with Combo Button

    You could try OrderNo = Val(cmbOrderNo.Value) Or OrderNo = Int(cmbOrderNo.Value)
  6. brucegn

    checkin if listboxes are filled, or not

    Look at the .ListCount property of the ListBox object. If List1.ListCount > 0 Then 'run code Else 'other code End If
  7. brucegn

    type mismatch handling

    In addition to skips' suggestion, you could also try adding Val() to your code; If Val(shipmentListWS.Cells(ShipmentFileRowIndex, 3)) = Val(MasterListWS.Cells(MasterListRowIndex, 4).Value) Then Which shoud return just the numeric value, which brings us full circle back to skips suggestion.
  8. brucegn

    output results to excel spreadsheet

    what you have posted is not too much for Excel to hold, without seeing your query or how you are putting into Excel it will be difficult to determine where the process is getting bogged down. A few things you can try though is to set Application.ScreenUpdating to False at the very beginning and...
  9. brucegn

    Deleting an Excel Worksheet

    Try adding Application.DisplayAlerts = False Before the line that is actually deleting the sheet and set it back after. Application.DisplayAlerts = False Sheets(1).Delete Application.DisplayAlerts = True
  10. brucegn

    Query a Registry Key

    I beleive this is what Centurion was referring to; This is some code that we use. We have put the first part into a module Option Explicit Public Const REG_SZ As Long = 1 Public Const REG_DWORD As Long = 4 Public Const HKEY_CLASSES_ROOT = &H80000000 Public Const HKEY_CURRENT_USER =...
  11. brucegn

    Outlook To Excel (Items Folder)

    Thanks to everyone, I just figured it out it did have to do with the Propdescrip, I changed the line objWS.Range("F" & (1 + i)).Value = PropDescrip To objWS.Range("F" & (1 + i)).Value = PropDescrip.Value And it worked fine. Sorry for the trouble for what seemed to be a simple fix. Thanks again,
  12. brucegn

    Outlook To Excel (Items Folder)

    Thanks Skip, that did not work either. I am a little perplexed by this, I appreciate everyones help. In the long run, it is not a big issue, I know if works from within Excel and I can make a custom menu to do it, I just was trying to get it to work from within Outlook
  13. brucegn

    Outlook To Excel (Items Folder)

    Here it is; Function GetExcelWS() As Excel.Worksheet Dim objExcel As Excel.Application Dim objWB As Excel.Workbook Dim objWS As Excel.Worksheet On Error Resume Next Set objExcel = New Excel.Application Set objWB = objExcel.Workbooks.Add Set GetExcelWS = objWB.Worksheets(1) objExcel.Visible =...
  14. brucegn

    Outlook To Excel (Items Folder)

    Thanks VBAjedi, but no dice. Same exact thing happened at the same line with same results. Thanks though, I will keep looking at it. I have also tried using Cells() with no luck. Back at it. Thanks.
  15. brucegn

    Outlook To Excel (Items Folder)

    Okay, to make it even more frustrating, I chopped up some of the original code and put it into a spreadsheet and it works fine. The below code is what I put into a spreadsheet Sub GetTaskItems() Dim objApp As Outlook.Application Dim objNS As Outlook.NameSpace Dim CISTaskItems As MAPIFolder...

Part and Inventory Search

Back
Top