Search Results - VBForums

Search:

Type: Posts; User: westconn1

Page 1 of 13 1 2 3 4

Search: Search took 0.43 seconds; generated 36 minute(s) ago.

  1. Re: Emailing Word document to a email receipient

    here is an example using outlook to send as requested


    Sub mysendmail()
    Set ol = GetObject(, "outlook.application")
    Set msg = ol.CreateItem(0)
    Set d = ThisDocument
    Set s = Selection
    With...
  2. Re: Emailing Word document to a email receipient

    that just demonstrates the the email can be sent to multiple recipients
    in your case it should be something like
    .addrecipient selection.text
    in place of the two above

    else replace the email...
  3. Re: Emailing Word document to a email receipient

    you can try this instead

    Activedocument.HasRoutingSlip = True
    With Activedocument.RoutingSlip
    .Subject = "New subject goes here"
    .AddRecipient "Firstaddress@Mail.com"
    .AddRecipient...
  4. Replies
    4
    Views
    98

    Re: userform - combobox & texbox

    i think you would need to sort the items prior to adding ie. sort the input range, else put all the items into an array then sort the array, then add to combobox
  5. Replies
    4
    Views
    98

    Re: userform - combobox & texbox

    for i = 1 to 15
    with userform.controls("Combobox" & i)



    Private Sub ComboBox1_Change()
    .
    .
    .
    .
  6. Re: Creating a code for data in Excel 2011 for Mac

    on which line?
    change the name of any worksheet in code to suit, worksheet must exist
  7. Re: [word] Fill or populate ListBox2 from closed .xlsx dependant on selection in List

    you are missing some " for the extended properties in your connection string

    .ConnectionString = "Data Source=" & "somepath\mybook.xls" & ";" & _
    "Extended Properties=""Excel...
  8. Re: Creating a code for data in Excel 2011 for Mac

    the code needs to be inserted into a procedure (sub or function)
    variables should be dimensioned


    Sub myfix()
    Dim target As Range, cel As Range, art As Range, rw As Long
    rw = 1
    Set cel =...
  9. Re: Creating a code for data in Excel 2011 for Mac

    you can try this, it is tested in excel for windows, but i assume this code should still work on the mac

    rw = 1
    Set cel = Sheets("sheet1").Cells(1, 1)
    Do Until cel.Row >= 70
    If Not...
  10. Replies
    5
    Views
    260

    Re: Opening Specific xls file

    OR
    you can try like

    Dim newsht As Worksheet
    worbooks.Open("c:\myfolder\myfile.xls").Sheets("sheet4").Copy , ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
    Set newsht =...
  11. Re: [Access] How to attach a PDF-Report to existing Outlook Template

    try like

    omsg.attachments.add "fullpath\filename.pdf"
  12. MsOf07 Re: Automatically take subject from received email and create new email

    as this is not a feature that i can check on, i can only assume it is correct

    to test, if the procedure runs when a message arrives, put a message box at the beginning of the code
    msgbox...
  13. MsOf07 Re: Automatically take subject from received email and create new email

    maybe your code should be in a different procedure
    or do you have some item collection with events, that should call the procedure you have above
  14. Replies
    4
    Views
    160

    Re: Change Webpage ComboBox Element...

    you must select the item by index
    else loop through the items to find the match
  15. MsOf07 Re: Automatically take subject from received email and create new email

    explain doesn't work
    what result are you getting so far?
    does it send an email?
    what needs to change?
  16. MsOf13 Re: Folder scan - go to next file on Error code 70

    you may need on error resume next in the recursivefolder procedure, for the inline error handling to work
  17. Re: [Word] populate listbox in userform in MSword with excel data

    here is an example using ADO (requires reference to Activex Data Objects) to populate listbox2 in clickevent of listbox1

    Dim cn As Connection
    Dim rs As Recordset
    Set cn = New Connection
    Set rs...
  18. Re: [Word] populate listbox in userform in MSword with excel data

    neither your workbook nor document contain your userform or any code, this may be because of the office compatibility conversion for word

    personally i would use ADO, with sql queries to do what...
  19. MsOf13 Re: Folder scan - go to next file on Error code 70

    assuming the error is occurring at parsename handle the inline error like


    For Each Fil In oFolder.Files
    Set objFolder = objShell.Namespace(oFolder.Path)
    Set objFolderItem =...
  20. Re: [Word] populate listbox in userform in MSword with excel data

    you should only populate listbox1 in the form initialize
    the other listboxes should be populated in turn in the click event of the preceding listbox, when the user selects the listitem in the parent...
  21. Thread: Send Email

    by westconn1
    Replies
    10
    Views
    391

    Re: Send Email

    if you want to use gmail, you will have to lower your gmail security settings for it to work now
  22. Replies
    4
    Views
    213

    Re: vba excel macros questions

    you still need to add the part from your previous code to invoke the olmail object
    try like


    Dim j As Long
    Dim lr As Long

    Dim olApp As Outlook.Application
    Set olApp =...
  23. Replies
    2
    Views
    254

    Re: Adding Disconnect Time

    try like

    "INSERT INTO tbl_ActiveUSers ([DisconnectTime]) VALUES (" & #NowDate# & ") WHERE = '" & frm_syscontrolform.txtLogid &'"

    assumes that disconnecttime is a Date field in database
    i am...
  24. Replies
    4
    Views
    213

    Re: vba excel macros questions

    yes, of course, you can do that
  25. Re: VBA - instantiate multiple ojects using variable name

    you should assign some key (index) to the object when adding to the collection, note in my code example i used employee.fname as the key, you can use whatever you prefer as the key, i am not sure...
  26. Re: Subtracting a set value from data and a If/Then statement

    change to

    If fnd.Offset(, 1) < CLng(TextBox2) thenor if it may use decimal parts try cdbl
  27. Re: VBA - instantiate multiple ojects using variable name

    i am not sure why sy's post was ignored, but here is a code example

    Dim emp As employee
    Dim employees As New Collection
    For Each cel In Range("b2:b20")
    Set emp = New employee
    emp.lname...
  28. Re: Subtracting a set value from data and a If/Then statement

    i tested the basic code, which worked correctly on some sheet with data

    can you post a workbook with forms and sample data that shows the problem
    zip workbook first
  29. Re: Subtracting a set value from data and a If/Then statement

    you can try like


    Private Sub CommandButton1_Click()

    set fnd = Sheets("18010AA").range("l:l").find(textbox1.value)
    if fnd is nothing then msgbox "WO# " & textbox1 & " not found":exit sub
    if...
  30. Re: [Resolved] Black text box when using Windows7

    all you can do is suggest the user tries playing with appearance (themes) or gets some other more up to date program or ap
  31. Re: [RESOLVED] How to copy highlighted email in Outlook (office 2010) to local drive?

    i am surprised that a file was being created at all in that case, but i did suggest changing the filename to test

    glad you got it working
  32. Re: How to copy highlighted email in Outlook (office 2010) to local drive?

    as it works correctly on my computer, i can not be sure as to what the problem could be on yours

    you could try changing the name of the saved file, i just used the subject to identify different...
  33. Re: How to copy highlighted email in Outlook (office 2010) to local drive?

    the error is indicating that no email is selected in the inbox
    i did test the code before posting, worked without error, but on checking now, wrong result

    this worked better

    Dim inb As...
  34. Re: How to copy highlighted email in Outlook (office 2010) to local drive?

    you can test this to see if it works for you

    Dim inb As MAPIFolder, msg As MailItem, fol As Object
    Set fol = CreateObject("shell.application").browseforfolder(0, "Select folder to save to", 0,...
  35. MsOf07 Re: How to create recordset, instead of temporary table

    i would assume you could do an inner join on the two tabels
  36. Replies
    6
    Views
    570

    Re: Search external file data using VB

    printed to what? form? printer?

    you can try like

    set wb = workbooks.open("fullpath\filename.xls")
    set sht = wb.sheets("sheetname")
    set fnd = sht.range("a:a").find(custnum) ' from whatever...
  37. Re: (excel) Someone made me a macro, but it only works sometimes, locate the error? H

    where is the Sadek procedure? that is the code that should run when the go button is clicked
    right click the Go button >veiw code (or assign macro)

    on testing my code with 20,000 rows, i made...
  38. Re: (excel) Someone made me a macro, but it only works sometimes, locate the error? H

    you can test this to see if it works correctly for you, it seemed correct with your file that did not work
    test with multiple data files

    i added a macro sheet to the same workbook, though i...
  39. Replies
    11
    Views
    662

    Re: Why use Object data type?

    variant is the default data type in VB6
    i believe object is the default in .net
  40. Replies
    9
    Views
    803

    Re: Oppening Balance

    opening balance = opening balance + sum (debits and credits)
    debits = 0
    credits = 0

    the sql is probably beyond me

    also this type of monthly aging is probably not the current style of doing...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.