Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"