LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default mailing labels. . .but first, name list

I want to create mailing lists from the name, address, city state zip info
on each sheet in the workbook. But I'm stumped on how to copy the range from
B1:B3 to another sheet ("names") and have the info run from A2:C2.

So far I'm able to have the data print only in the A column and for the code
I have:

Private Sub CommandButton2_Click()

Dim iSheet As Integer, iBefore As Integer
Dim sSheetName As String, sActiveCell As String
Dim cRow As Long, cCol As Long, cSht As Integer
Dim lastcell
Dim qSht As String
Dim mg As String
Dim rg As Range
Dim CRLF As String
Dim Name As String
Dim Address As String
Dim CityStZ As String
Dim Reply As Variant
With Range("A1:F40").Font.Size = 20
End With
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
cRow = 1
cCol = 1
sSheetName = UCase(ActiveSheet.Name)
sActiveCell = UCase(ActiveCell.Value)
'mg = ""
'CRLF = Chr(10) 'Actually just CR
Range("A1").Select
For cSht = 1 To ActiveWorkbook.Sheets.Count
' cCol = cCol + 0
' cRow = cRow + 1
' MsgBox Range(cCol, cRow)
qSht = Application.Substitute(Sheets(cSht).Name, """", """""")
Sheets("names").Cells(cRow + cSht, cCol).Formula =
ActiveSheet.Range("B1B3")
'_
' "=hyperlink(""[" & ActiveWorkbook.Name _
' & "]'" & qSht & "'!A1"",""" & qSht & """)"

Name=UCase(ActiveSheet.Range("B1"))
Address = UCase(ActiveSheet.Range("B2"))
CityStZ = UCase(ActiveSheet.Range("B3"))
'MsgBox Address
On Error Resume Next
If TypeName(Sheets(cSht)) < "Worksheet" Then GoTo byp7
Set lastcell = Sheets(cSht).Cells.SpecialCells(xlLastCell)
byp7: 'xxx
On Error GoTo 0
Next cSht

Application.ScreenUpdating = True
Application.ScreenUpdating = False


End Sub

Any suggestions?


 
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
format a list of names to mailing labels Mary-new to mail lists New Users to Excel 2 November 2nd 07 11:46 PM
merging excel address list to mailing labels SmallBusinessSam Excel Discussion (Misc queries) 2 October 26th 07 10:48 PM
How do I convert a list of data into mailing labels? Kim G Excel Worksheet Functions 2 April 21st 06 06:03 PM
How do I get data list to print mailing labels? John Nichols Excel Discussion (Misc queries) 1 December 15th 05 04:19 PM
how do I convert a list in Excel to mailing labels mcguff Setting up and Configuration of Excel 1 November 29th 04 03:58 PM


All times are GMT +1. The time now is 11:48 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"