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: 24
Default The Information cannot be pasted Message

I have waited 20 hours, and have not found my problem.

This is as a result of lack of experience and a typo yesterday.

I have two methods listed and I cannot get either one to work. Assistance
would be greatly appreciated as I would like to give the school board some
information Monday Night!

Here is my code with the error's marked with '*

Thanks Again for assistance

ClassAAAA

Dim wkst As Worksheet ' Current Sheet
Dim lbls As Workbook
Dim wslb As Worksheet ' Work Sheet
Dim lastRow As Long

Set wkst = ActiveSheet
Set lbls = Workbooks.Add(1)
Set wslb = lbls.Worksheets(1)
lbls.Title = "Letters to Educators"
lbls.Subject = "Grades"

With wkst
..AutoFilterMode = False
..Columns(12).AutoFilter Field:=1, Criteria1:="AAA"
..Columns(2).Copy wslb.Columns(2)
'* The Information cannot be pasted because the Copy area and the paste area
are not the same size and shape
..Columns(5).Copy wslb.Columns(3)
..Columns(7).Copy wslb.Columns(4)
..Columns(8).Copy wslb.Columns(5)
..Columns(9).Copy wslb.Columns(6)
End With

wslb.SaveAs Filename:="C:\ExcelExp\TxLabels.xls",
FileFormat:=xlNormal

MsgBox "Class AAAA Completed"

End Sub

' Also Tried This Method

Sub ClassAAA()

Dim wkst As Worksheet ' Current Sheet
Dim lbls As Workbook
Dim wslb As Worksheet ' Work Sheet
Dim lastRow As Long
Dim chkClass As String

Set wkst = ActiveSheet
lastRow = Range("L" & Rows.Count).End(xlUp).Row
Range("L1").Select
chkClass = "AAA"

SelCol = InputBox("Enter the Column for the Educator You Want to
Send Letters to:!")
Set lbls = Workbooks.Add

With lbls
..Title = "Letters to Educators"
..Subject = "Grades"
End With

Set wslb = ActiveSheet
Do Until ActiveCell.Row lastRow
If ActiveCell.Value = chkClass Then
'* ActiveCell.Value is Always Empty

wkst.Columns(3).Copy wslb.Columns(2)
wkst.Columns(5).Copy wslb.Columns(3)
wkst.Columns(7).Copy wslb.Columns(4)
wkst.Columns(8).Copy wslb.Columns(5)
End If
ActiveCell.Offset(1, 0).Activate ' Move to Next Row
Loop

wslb.SaveAs Filename:="C:\ExcelExp\TxLabels.xls",
FileFormat:=xlNormal

MsgBox "Class AAA Completed"

End Sub


John Q.
 
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
Prevoiusly posted message: Unable to remove objects pasted into Excel from HTML grid X-Ice Excel Worksheet Functions 1 January 16th 07 10:57 AM
Get rid of Information message fmistry Excel Discussion (Misc queries) 3 October 2nd 06 09:49 PM
Get rid of Information message fmistry Excel Discussion (Misc queries) 0 October 2nd 06 06:36 PM
Formatting information copied and pasted from the WEB to excel jbsand1001 Excel Discussion (Misc queries) 5 April 5th 05 09:07 PM
Popup or Information Message Todd Huttenstine Excel Programming 3 May 25th 04 02:45 AM


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