Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Exporting Logo from Access 97 to Excel 2000 by copy and pastespecial is stopping Cell A1 selection

Thank you Manu for your help. Your code was exactly what I was trying to
find. I have tried it but it only works without the logo.

I have tried this code to put the log on differently as I am copying the
logo from the form in access and pastespecial into each of the looped
worksheets which leaves the logo selected on each of the sheets.

This code looks at a folder on our network for the logo.
It works but it does not put the last logo onto cell "G1"
it puts the last one on cell "A1" I don't know if its because it is at
the end of loop.

Do Until Rst_2.EOF
FldName = Rst_2.Fields("ContractName")
Set shts = wkbk.ActiveSheet
wkbk.Sheets.add

objExc.Range("G1").Select
shts.Pictures.Insert ( _
"S:\Invoicing\PAYMENT CERTIFICATES\Payment Certificate
Database\Telent Logos\telent_logo.gif" _
)

regards,
Sid.






*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Exporting Logo from Access 97 to Excel 2000 by copy and pastespecial is stopping Cell A1 selection

This is just to let you know that I have now successfully fixed my
problem.

I had the pastespecial in the wrong place. I put it at the end instead
of the begining where the sheets were created.

this is my code now. It pastes the logo on to all the created worksheets
in position (1,7) and then finishes by selecting cells (1,1)


Do Until Rst_2.EOF
FldName = Rst_2.Fields("ContractName")
Set shts = wkbk.ActiveSheet

'puting the pastspecial of the logo here makes sure it is not
selected on each sheet
'and that each sheet finishes on cell "A1"
Set Rge = shts.Rows.Cells(1, 7)
Rge.PasteSpecial 'this pastes the logo on after all other data
so that it only pastes once into each workshee
Set Rge = shts.Rows.Cells(1, 1)
Rge.Select


Thank you for all your help
regards,
Sid




*** Sent via Developersdex http://www.developersdex.com ***
Reply
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
Exporting Access to Excel - Characters per cell limitation Bowtie63 Excel Discussion (Misc queries) 0 December 11th 07 09:42 PM
Excel 2003 vs 2000: PasteSpecial marcevan Excel Programming 2 October 3rd 05 08:13 PM
Stopping Excel after running visual basic in Access Bill McCaleb Excel Programming 4 April 4th 04 02:20 AM


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