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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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...
  16. brucegn

    Outlook To Excel (Items Folder)

    Hello everyone, I could use a fresh set of eyes on the below procedure. I outlined the line that seems to be giving trouble. What is happening is when it reaches the PropDescrip line it just stops with no error, even when I step through it. The wierd part is that it puts the information for...
  17. brucegn

    Problem with using paste while altering autofilter at same time

    Not sure if this helps, but I think this is what Tony was referring to Private Sub CommandButton3_Click() Sheets("valmiit").Select ActiveSheet.Range("A1:J1").Copy Sheets("työlista").Select ActiveSheet.Range("A3:J3").AutoFilter Dim LastRow As Long r = ActiveSheet.UsedRange.Rows.Count c =...
  18. brucegn

    Excel To Outlook Link

    Hopefully this can get you started in the right direction Sub GetCalendarItems() 'set reference in design mode to Microsoft Outlook xx.x Dim objO As Outlook.Application Dim objNS As NameSpace Dim objCalendar As MAPIFolder Dim objItem As AppointmentItem Dim strSearchItem As String Dim...
  19. brucegn

    Built in Column Length Function?

    There are a couple of ways to do what you want, these are just a few Dim rngCnt As Integer Columns("C:C").Select 'select the column of data Selection.CurrentRegion.Select 'select all rows that hold data rngCnt = Selection.CurrentRegion.Cells.Count 'gives you the count of rows in...
  20. brucegn

    error handling skipping file help

    If I understand correctly you can either use; On Error Resume Next before the line of code that is causing the error. Or you can check to see if the line you are checking is a date or is blank If Not IsNull(variable_to_check) Then If IsDate(variable_to_check) Then Do_What_You_Gotta_Do...

Part and Inventory Search

Back
Top