Search:

Type: Posts; User: ZVI; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    28
    Views
    245

    Re: Attachment Download

    Thanks for the clarification, but please bear in mind that my code posted in this thread should be in the ThisOutlookSession Outlook's module.
  2. Replies
    18
    Views
    260

    Re: Auto generation of serial number in user form

    According to the post 15 it seems that there are 4 digits in the serial number "A4 has written TARA-SS-0001", if so then replace 3 by 4 in the code. and use "0000" in the result formatting. As to...
  3. Replies
    18
    Views
    260

    Re: Auto generation of serial number in user form

    May be try also a bit modified code where "Sheet2" is replaced with 2 and the Evaluate formula ignore empty and not serial number values:


    Sub test()
    Dim x As Long
    With...
  4. Replies
    18
    Views
    260

    Re: Auto generation of serial number in user form

    If Sheet2 is not active at running that macro then I'd suggest add .Worksheet. into this code line:
    x = .Worksheet.Evaluate(...

    And for that code it is assumed the sheet name is "Sheet2" and the...
  5. Replies
    28
    Views
    245

    Re: Attachment Download

    In fact, this should not happen if the code is in the Outlook module,
    as it was mentioned in the first post:

    So where actually the code is?
    What version of MS Office are you using?
  6. Replies
    28
    Views
    245

    Re: Attachment Download

    Does code from post 17 or 18 work?
  7. Replies
    28
    Views
    245

    Re: Attachment Download

    The below code works with any input emails independently of input folder:


    ' Code of ThisOutlookSession
    Option Explicit

    Private Sub Application_Startup()
    ' Do nothing, but this tries to...
  8. Replies
    28
    Views
    245

    Re: Attachment Download

    Well, does the below code work?


    Option Explicit

    Public WithEvents objInboxItems As Outlook.Items

    ' Run this code manually for the testing or reload Outlook
    Private Sub...
  9. Replies
    28
    Views
    245

    Re: Attachment Download

    And please do you have 1 or more accounts?
  10. Replies
    28
    Views
    245

    Re: Attachment Download

    The code requirs full Outlook's path from the root to the Folder with subfolders.
    Could you post it?
    If it is a common folder then code may not work, it depends on server configuration
  11. Replies
    28
    Views
    245

    Re: Attachment Download

    When you are running Test, does it show Folder name where emails are expected to be?
  12. Re: VBA Error window has changed - no more Debug button

    But this code get Compile Error with X-button.


    Option Explicit
    Sub Test()
    i = 0
    End Sub

    Just for the case , make sure that Option Explicit code line is in all code modules,
    then try...
  13. Re: VBA Error window has changed - no more Debug button

    I meant that there is no X-button (to close) in internal error message of VBE, but it is in MsgBox.
    Some AddIns (Excel's or COM) can produce such a message box.
    Try temporary disabling all...
  14. Replies
    28
    Views
    245

    Re: Attachment Download

    Run manually the Test, it shows the Folder where emails are expected for the code.
    Is this folder correct for your purpose?
    Emails coming into other folders do not trigger the code

    As to the...
  15. Re: VBA Error window has changed - no more Debug button

    Thanks for testing, have no good ideas then.
    May be something is damaged in the workbook structure or in VBA compiled chains.
    If possible please share that workbook for analyzing without sensitive...
  16. Re: VBA Error window has changed - no more Debug button

    This can be just a msgbox, like this:


    Sub Test()
    On Error Resume Next
    Err.Raise 91 '<-- Error 91 simulation
    If Err Then MsgBox Err.Description, vbExclamation + vbMsgBoxHelpButton
    End...
  17. Replies
    2
    Views
    93

    Re: Combine Two VBA Codes

    Hi,
    You may try this:


    Sub SheetsToCsv()

    Const ExcludeSheets = "/Taxonomy/Master/Directions/EU Shipping & Gift Wrap/Tax Rates/RuleFile/TDM/"

    Dim sDate As String, sFolderName As...
  18. Replies
    28
    Views
    245

    Re: Attachment Download

    The code of objInboxItems_ItemAdd is triggered in case emails are going to this folder:


    Sub Test()
    With Session.GetDefaultFolder(olFolderInbox)
    MsgBox .Parent & "/" & .Name
    End With...
  19. Replies
    1
    Views
    61

    Re: Docking Station affecting add-ins?

    Hi,

    Your assumption is correct.
    At loading Excel is trying to load all installed AddIns and suggest to delete from the list of AddIns those not found/disconnected.

    The simlest suggestion is to...
  20. Re: EXCEL/VBA QUESTION - how to open outlook and access one email content from inbox and further process using VBA

    Hi,
    You may start with this code:


    Sub Save_CSV_attachment()

    ' Outlook constant
    Const olFolderInbox = 6

    ' Settings, change to suit
  21. Replies
    4
    Views
    156

    Re: VBA code already there in brand new file

    Or may be it's just Option Explicit code line there.
    If so then you can ignore that as it does not saved with XLSX, such a behavior can be disabled in VBE - Tools - Options - Editor - Require...
  22. Replies
    3
    Views
    144

    Re: Formatting a Text String in VBA

    You are welcome, thanks for the feedback
  23. Replies
    3
    Views
    144

    Re: Formatting a Text String in VBA

    Hi and welcome to MrExcel forum!
    Try this:
    

    Function MAR_Message_SECURE() As String

    Const Font1 = "<" & "span style='font-family:Arial;color:skyblue;font-weight:bold;font-size:14pt'" &...
  24. Thread: Compile Error

    by ZVI
    Replies
    5
    Views
    126

    Re: Compile Error

    If code is working with other workbooks then my suggestion in post 2 can't help.
    However, one of the problem can be in a fact that XLSMs is blocked.
    How to unblock XLSM read in this page of JKP...
  25. Re: Userform - If value is not found then displays a MsgBox

    One more way
    

    Private Sub CommandButton1_Click()
    Dim x As Long
    Dim y As Long
    Dim IsFound As Boolean
    x = Sheets("ACCOUNT_ASSIGN").Range("A" & Rows.Count).End(xlUp).Row
    For y = 2 To...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4