Thread: Trouble Pasting
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
RNorfolk RNorfolk is offline
external usenet poster
 
Posts: 6
Default Trouble Pasting

Hmm - went just fine in 2003 for you.... what do I have different?

my brain hurts... ANy thoughts on what could cause the difference?
--
Roger Norfolk
Office 97 MOUS Master


"Don Guillett" wrote:

I went to that sitecopied all of the tablepasted into excel 2003 sp3 just
fine.
Same with only the first few rows..?
But, why are you doing copy/paste when you can use an external query to just
bring in the table and then cull what is needed. Below recorded and should
be cleaned up further

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 6/23/2009 by Donald B. Guillett
'

'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.ssa.gov/OACT/STATS/table4c6.html",
Destination:=Range("A3"))
.Name = "table4c6"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

Again, recorded and should be cleaned up to avoid selections.
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 6/23/2009 by Donald B. Guillett
'

'
Range("A2:G12").Select
Selection.Copy
Sheets("Sheet3").Select
Range("A2").Select
ActiveSheet.Paste
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"RNorfolk" wrote in message
...
I have an example that best shows what I am trying to do. If you go to
http://www.ssa.gov/OACT/STATS/table4c6.html and select part of the table
and
paste in Excel 2003 or 2007, the data does not go cleanly into the cells.
If
pasted into Excel 97, it goes into each cell so it could be manipulated.
Any
idea how to make 2003 paste into each cell?

p.s. this is an example. The data I am trying to make work is of varying
length fields that are not deliminated in any way when pasted. It does
just
the same though.
--
Roger Norfolk
Office 97 MOUS Master