Type: Posts; User: westconn1
Search took 0.43 seconds; generated 36 minute(s) ago.
here is an example using outlook to send as requested
Set ol = GetObject(, "outlook.application")
Set msg = ol.CreateItem(0)
Set d = ThisDocument
Set s = Selection
that just demonstrates the the email can be sent to multiple recipients
in your case it should be something like
in place of the two above
else replace the email...
you can try this instead
Activedocument.HasRoutingSlip = True
.Subject = "New subject goes here"
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
for i = 1 to 15
with userform.controls("Combobox" & i)
Private Sub ComboBox1_Change()
on which line?
change the name of any worksheet in code to suit, worksheet must exist
you are missing some " for the extended properties in your connection string
.ConnectionString = "Data Source=" & "somepath\mybook.xls" & ";" & _
the code needs to be inserted into a procedure (sub or function)
variables should be dimensioned
Dim target As Range, cel As Range, art As Range, rw As Long
rw = 1
Set cel =...
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
you can try like
Dim newsht As Worksheet
worbooks.Open("c:\myfolder\myfile.xls").Sheets("sheet4").Copy , ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)
Set newsht =...
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
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
you must select the item by index
else loop through the items to find the match
explain doesn't work
what result are you getting so far?
does it send an email?
what needs to change?
you may need on error resume next in the recursivefolder procedure, for the inline error handling to work
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
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...
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 =...
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...
if you want to use gmail, you will have to lower your gmail security settings for it to work now
you still need to add the part from your previous code to invoke the olmail object
Dim j As Long
Dim lr As Long
Dim olApp As Outlook.Application
Set olApp =...
"INSERT INTO tbl_ActiveUSers ([DisconnectTime]) VALUES (" & #NowDate# & ") WHERE = '" & frm_syscontrolform.txtLogid &'"
assumes that disconnecttime is a Date field in database
yes, of course, you can do that
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...
If fnd.Offset(, 1) < CLng(TextBox2) thenor if it may use decimal parts try cdbl
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
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
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
all you can do is suggest the user tries playing with appearance (themes) or gets some other more up to date program or ap
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
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...
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...
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,...
i would assume you could do an inner join on the two tabels
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...
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...
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...
variant is the default data type in VB6
i believe object is the default in .net
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...
Click Here to Expand Forum to Full Width
Survey posted by VBForums.