Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro help, please
Need a marco to open up a message/text box where you're able to inpu data...and then have that data transferred to another workbook onc "ok" is clicked. On the new workbook it's transferred to, I'd like i to know to parse on the next empty row in column A, and in column next to it, to enter name of the workbook (file) it's coming from. Th second workbook where the info. will be parsed to will be name "individual" for example. Plleeeeease help!! P.S. - I bought a number of books on amazon.com last night dedicated t vba...so hopefully I won't be posting for help for that much longer. : -- spiros ----------------------------------------------------------------------- spirosu's Profile: http://www.excelforum.com/member.php...nfo&userid=744 View this thread: http://www.excelforum.com/showthread.php?threadid=52320 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro help, please
This may give you something to work with (I'm assuming the data goes into
"Sheet1" on the Individual workbook - change if necessary) Sub test2() Dim TargetWkSht As Worksheet Dim LastCell As Range Dim TargetRow As Long On Error Resume Next Set TargetWkSht = Workbooks("Individual.xls").Worksheets("Sheet1") 'Exit if target workbook not open, or target 'worksheet not found If TargetWkSht Is Nothing Then MsgBox "Target worksheet not found!" Exit Sub End If On Error GoTo 0 With TargetWkSht 'Exit if Column A is full If .Cells(.Rows.Count, 1) < "" Then _ Exit Sub 'Find the last cell in Column A 'with data in it Set LastCell = .Cells(.Rows.Count, 1).End(xlUp) 'Check to see if A1 is LastCell 'and does not contain data 'otherwise, select the next cell 'below it If LastCell.Value = "" Then TargetRow = 1 Else: TargetRow = LastCell.Row + 1 End If 'Input data .Cells(TargetRow, 1).Value = _ InputBox("Input Data") .Cells(TargetRow, 2).Value = _ ThisWorkbook.Name End With End Sub "spirosu" wrote: Need a marco to open up a message/text box where you're able to input data...and then have that data transferred to another workbook once "ok" is clicked. On the new workbook it's transferred to, I'd like it to know to parse on the next empty row in column A, and in column B next to it, to enter name of the workbook (file) it's coming from. The second workbook where the info. will be parsed to will be named "individual" for example. Plleeeeease help!! P.S. - I bought a number of books on amazon.com last night dedicated to vba...so hopefully I won't be posting for help for that much longer. :) -- spirosu ------------------------------------------------------------------------ spirosu's Profile: http://www.excelforum.com/member.php...fo&userid=7442 View this thread: http://www.excelforum.com/showthread...hreadid=523201 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro help, please
JMB, It's works brilliantly, it's exactly what I was looking for. I owe yo a debt of gratitude! Thanks so much. I just pray that I can attai your level of macro writing sooner than later. Thanks again. best regards, Spiro -- spiros ----------------------------------------------------------------------- spirosu's Profile: http://www.excelforum.com/member.php...nfo&userid=744 View this thread: http://www.excelforum.com/showthread.php?threadid=52320 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro help, please
You're most welcome. Thanks for your kind words.
"spirosu" wrote: JMB, It's works brilliantly, it's exactly what I was looking for. I owe you a debt of gratitude! Thanks so much. I just pray that I can attain your level of macro writing sooner than later. Thanks again. best regards, Spiro D -- spirosu ------------------------------------------------------------------------ spirosu's Profile: http://www.excelforum.com/member.php...fo&userid=7442 View this thread: http://www.excelforum.com/showthread...hreadid=523201 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |