LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to edit text string data input

I copied you code from the email, pasted it into a module. Renamed a sheet
to be named Data and it ran fine for me.


Perhaps you have pasted it inside another procedure or something or picked
up a stray End Sub command after the procedure declaration line.


--
Regards,
Tom Ogilvy


"Dee" wrote in message
...
Tom:

I set up Sheet 1 as my 'data input' and 'parse data' sheet. I set up Sheet

2
as the 'clean data' sheet and named it Data, with my mailing list headers

in
A1 through H1.

I added the following macro to determine the next open row in the Data

sheet
per your instructions:

Sub Append()

Set rng = Worksheets("Data").Cells(Rows.Count, "A").End(xlUp)(2)
rng.Value = sLast_Name
rng.Offset(0, 1).Value = sFirst_Name
rng.Offset(0, 2).Value = sOffice
rng.Offset(0, 3).Value = sCompany_Address
rng.Offset(0, 4).Value = sCity_and_Zip
rng.Offset(0, 5).Value = sphone
rng.Offset(0, 6).Value = sFax
rng.Offset(0, 7).Value = sEmail_Address

End Sub

and I get the following error message when I run Append:

"Set" is highlighted

Microsoft Visual Basic error
Compile Error:
Invalid Outside Procedure

What am I doing wrong?

Thanks...

Dee


"Tom Ogilvy" wrote:

to find the next open row in you data (assume the sheet with the cleaned

up
data is named Data)

set rng = Worksheets("Data").Cells(rows.count,"A").End(xlup) (2)
rng.Value = sLastName
rng.offset(0,1).value = sFirstName
rng.offset(0,2).Value = sOffice

and so forth

--
Regards,
Tom Ogilvy



 
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
Reset row hight after string of text edit on a cell Tony Excel Discussion (Misc queries) 0 February 3rd 09 03:21 AM
edit text string in column B useR Excel Discussion (Misc queries) 7 April 7th 06 10:10 PM
Macro to find text string in a column and paste data in another nicolascap Excel Discussion (Misc queries) 8 March 14th 06 03:13 PM
How to import a text file to Excel treating all input content are in string. Chittu Excel Discussion (Misc queries) 1 July 22nd 05 06:37 AM
insert data into macro code from text input field? john_t_h[_15_] Excel Programming 1 January 16th 04 03:14 AM


All times are GMT +1. The time now is 07:15 PM.

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

About Us

"It's about Microsoft Excel"