Re: Copy matching multiple cell data from one workbook to another.
thank you. works great. Much appreciated:)
Re: Copy matching multiple cell data from one workbook to another.
thank you. works great. Much appreciated:)
Re: Copy matching multiple cell data from one workbook to another.
OMG, Im so sorry I forgot to place the time in column D. say... 19:00. and its the same for each row (so the time stays the same for all dates in main xlxs). so we are matching month, day, year, AND time. sorry again and thanks again. resulting image attached.
SN
Re: Copy matching multiple cell data from one workbook to another.
anyone?
Re: Copy matching multiple cell data from one workbook to another.
Yes, all the data for matching dates. Thank you
Hi there,
I have two files. one is called Main.xlsx and the other is called 2011_9_9.xlsx. I would like to run a macro that will match the date (month year and day, all in separate columns) in Main.xlsx with 2011_9_9.xlsx and copy the row data of that date of 2011_9_9(range F to Y) to Main.xlsx.
I have attached the sample files. it will make clear sense once you look at at. thank you so much in advance. any help would be appreciated. i have looked around the web and found ways to copy data from one workbook to another but nothing on multiple cell matches. thanks again.
regards,
SN
Re: RUN TIME ERROR 1004 application-defined or object-defined error HELP
thank you very much. works perfectly. and thanks cytop for the explanation.
hi there,
I have acquired a code from this forum that keeps the columns with particular headers and deletes the rest.
http://www.ozgrid.com/forum/showthread.php?t=152866
the problem I am having is that this code only works for a small range of columns. if my file has more than 74(BV) columns, the macro throws a run time error 1004 application-defined or object-defined error. I did some research and this error is due to stack overflow I think. any way around it?
hi there,
How can I find prime numbers in a range and highlight it if a number in a cell is a prime. Any help would be appreciated. thank you.
Hi there,
I am trying to extract data from a website:
http://teilhard.global-mind.or…9%3A59&gzip=Yes&idate=Yes
I looked at the source code of the website and realized that if you notice (above) that the variables listed in the link (i.e year, month, day) are exactly what i need to change in order to get the data for a specific date. how can I accomplish this using VBA. so say I have in on an excel sheet year in column A, month in column B, and days in column C (time interval is constant so we don't have to worry about stime and etime). and i run the macro and it loops through each row taking year,month,day for all rows and saving the data as .csv or xls files? any help would be appreciated. thanks in advance.
hi there,
i am using a userform vba code to send emails via outlook. i want to be able to save a copy of that sent email on the hard drive folder. so if im attaching a file from "C:\test", when i send the email a copy of that email should be saved in "C:\test". is it possible. below is the code i am currently using. thank in adavnace.
Public Function sendemail()
On Error Goto ende
esubject = "test"
sendto = [email protected]
ccto = [email protected]
ebody = "test"
newfilename = "C:\test"
Set app = CreateObject("Outlook.Application")
Set itm = app.CreateItem(0)
With itm
.Subject = esubject
.To = sendto
.CC = ccto
.Body = ebody
.Attachments.Add (newfilename)
.Display
.Send
End With
Set app = Nothing
Set itm = Nothing
ende:
End Function
Display More
Re: how to show selection from combo in a textbox
thank you. that did it
hi there,
is there a way the following code can be setup to attach all the files in the folder to an email. thanks in advance.
Public Function sendemail()
On Error GoTo ende
esubject = UserForm1.cboLocation & "Files for Week Ending " & WeekEndingBox.Text
sendto = UserForm1.toText.Text
ccto = UserForm1.ccText.Text
ebody = "test body" & vbccrlf & "SN"
newfilename = "C:\test" 'possible to have filles added from a particular folder
'search
Set app = CreateObject("Outlook.Application")
Set itm = app.CreateItem(0)
With itm
.Subject = esubject
.To = sendto
.CC = ccto
.Body = ebody
.Attachments.Add (newfilename) 'something here needs to change
.Display
'.Send
End With
Set app = Nothing
Set itm = Nothing
ende:
End Function
Display More
hi there,
first off Happy Canada day weekend!.
I have a working combobox that shows selected items from a worksheet. i want to be able to show the selected text that i choose in the combobox in a textbox.
so say i select Apple in the combobox. the textbox underneath should display "Apple". how can i achieve this. here is the code for the combo box if it would help. anyhelp or hints would be greatly appreciated. thanks.
Private Sub cboLocation_Change()
End Sub
Private Sub UserForm_Initialize()
Dim cLoc As Range
Dim ws As Worksheet
Set ws = Worksheets("sheet1")
For Each cLoc In ws.Range("LocationList") '
With Me.cboLocation
.AddItem cLoc.Value
End With
Next cLoc
End Sub
Private Sub toText_Change()
' is the textbox that needs to display the value i have selected from the combobox
End Sub
Display More
Re: Emailing using userform via worksheet data corresponding to columns
help anyone?
Hi there,
I have created an excel file (testemails.xls). In column A there are client names, in column B there are client email address', and in column C cc email address'. Now i want to create a user form that has a combobox and two text boxes. the combobox will allow me to choose a client (from column A). upon selecting the client, textbox 1 will automatically show the email address from column B and textbox 2 will show email address from column C.
for example: if i choose a value from the dropdown box that is in Cell A1 then automatically, textbox1 will show value of Cell B1 and textbox2 will show the value of Cell C1. ultimately, the goal is to send the email to selected email address, which i have an idea how to do but I don't know how to link the combobox to the two textboxes. any help would be greatly appreciated. many thanks in advance.
Re: sending email using VBA won't work
hi there,
since the problem is solved i can move on to the next step of the program. It's to do with email attachments using a list of emails in a worksheet. should I start a new thread for it? or continue here? thanks
hi there,Im trying to send email through outlook using vba command button but nothing seems to be happening when i click the button. if the outlook is already open nothing happens and if the outlook is closed then I get a the outlook icon at the bottom right hand side tray with a little gear and when i hover over it it says "another program is using outlook, to disconnect programs and exit outlook, click the outlook icon and then click exit now." tried that and still nothing. Help please. thanks in advance.
Private Sub CommandButton1_Click()
sendemail
End Sub
Public Function sendemail()
On Error GoTo ende
esubject = "test subject"
sendto = "[email protected]"
ccto = "[email protected]"
ebody = "test body" & vbccrlf & "SN"
newfilename = "C:\test.csv"
Set app = CreateObject("Outlook.Application")
Set itm = app.creatitem(0)
With itm
.Subject = esubject
.to = sendto
.cc = ccto
.Body = ebody
.Attachments.Add (newfilename)
.display
.send
End With
Set app = Nothing
Set itm = Nothing
ende:
End Function
Display More
Re: Macro on multiple files in a folder Run time error 424
OMG lol. it should be Workbooks.open and ActiveWorkbook.Save and ActiveWorkbook.Close. Where i got the code from said just change the extension n pathname. Works perfectly now.thank you soo much.
cheers,
SN
Re: Macro on multiple files in a folder Run time error 424
excel workbooks