Macro Help Please?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have this macro that copies information for a selected cell. It uses the
information to goto a weblink copies the information and returns it to z3. my
problem is that i only need information from the b cells but it is grabing
the a cells as well. As suggestions?
weblink http://www.geocities.com/btobin0/17May2006.html
excel cells = Z2 for active cell : Z3 to paste information
information in z2 = 17May2006

macro:

Sub Macro3()

'ActiveCell.Value
Selection.Copy
'Application.CutCopyMode = False
'Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"http://www.geocities.com/btobin0/" & ActiveCell.Value & ".html"
Range("B10").Select
Selection.UnMerge
Range("B10:B20", "B22:B32").Select
Selection.Copy
ActiveWorkbook.Close
'Application.DisplayAlerts = False
Sheets("Sheet1").Select
Range("z3").Select
ActiveSheet.Paste

End Sub
 
The range you are selecting is actually B10:B32.
If there are any merged cells in that range then the actual range
will be different. Your unmerge command may not have
cleared all of the entire range.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Btobin0" <[email protected]>
wrote in message
I have this macro that copies information for a selected cell. It uses the
information to goto a weblink copies the information and returns it to z3. my
problem is that i only need information from the b cells but it is grabing
the a cells as well. As suggestions?
weblink http://www.geocities.com/btobin0/17May2006.html
excel cells = Z2 for active cell : Z3 to paste information
information in z2 = 17May2006
macro:
Sub Macro3()

'ActiveCell.Value
Selection.Copy
'Application.CutCopyMode = False
'Application.DisplayAlerts = False
Workbooks.Open Filename:= _
"http://www.geocities.com/btobin0/" & ActiveCell.Value & ".html"
Range("B10").Select
Selection.UnMerge
Range("B10:B20", "B22:B32").Select
Selection.Copy
ActiveWorkbook.Close
'Application.DisplayAlerts = False
Sheets("Sheet1").Select
Range("z3").Select
ActiveSheet.Paste

End Sub
 
How can I use B10:B32 and unmerge B22. I have tried everything i could think
of and nothing worked. Can you give it to me?
 
That would be a first.
Maybe you should post most/all of your code.
Jim Cone

When I add this it only grabs one cell B10 and nothing below it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top