Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default sht and wrkbook proc copy

Dim comS As VBIDE.VBComponent, comD As VBIDE.VBComponent, wbS, wbD, codM
As CodeModule, srshtS, srshtD
Dim comsS As VBIDE.VBComponents, comsD As VBIDE.VBComponents
Set comsS = ThisWorkbook.VBProject.VBComponents
Set comsD = Workbooks("ha.xls").VBProject.VBComponents

For Each comS In comsS
If comS.Type = vbext_ct_Document Then
Set codM = comS.CodeModule
srcodS = codM.Lines(1, codM.CountOfLines)
For Each comD In comsD
If comD.Type = vbext_ct_Document Then
srshtS = comS.Properties("name")
srshtD = comD.Properties("name")
If srshtS = srshtD Or codM = "ThisWorkbook" Then
comD.CodeModule.AddFromString srcodS 'error line
Exit For 'error line
End If
End If
Next
End If
Next

I want to copy sheets and thisworkbook procedures between
projects.......
but,,, error ..... ooooooooooh
error occur, and the excel application is killed







*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default sht and wrkbook proc copy


hey, barb!
I know the site already......
I did many method for acomplishment the object...
But, I failed....
the stadard module, class module, form module is succed.. but the sht,
and thisworkbook module.... is difficult...

I want to get help from anyone.



*** 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
Determine whether a wrkbook have been changed since the last save Henk Frigge[_2_] Excel Programming 2 January 11th 06 10:21 PM
Read Only Wrkbook Sheet halem2[_7_] Excel Programming 1 August 19th 04 07:48 PM
Open wrkBook (auto_open) programmatically Sean McPoland[_3_] Excel Programming 2 August 19th 04 07:22 PM
linked wrkbook dakota Excel Programming 0 January 23rd 04 04:33 PM
retrieve data from from a variable wrkbook bobbythefish Excel Programming 3 January 13th 04 03:44 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"