Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default MSCOMM32 Control

Has anyone ever dealt with the MSCOMM32.OCX control via MS Excel?

I have an application I build recently, but I would like to automate it a bit. Every time I transfer the file from one PC to another, it takes a bit of time to set up. Does anyone have any experience with this type of automation?

The big problems are as follows:

Usually I have to make sure the PC it is going on has the MSCOMM32 file and that it is registered with Windows.

Once that pain-staking task has taken place I have to add the MSCOMM controls back to my userform.

After doing this all seems to be okay, but some of the items above can be difficult on some PCs.

Can this type of thing be packaged and or automated?

--
Mark Ivey
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default MSCOMM32 Control

I don't have it here but this can easily be accomplished. I use a two-line
CMD shell script that uses xcopy in the first line to copy the OCX to the
user's %systemroot%\system32 directory then use regsvr32.exe on the second
line to register the control as part of a small Access/Excel installation
routine.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Mark Ivey" wrote:
Has anyone ever dealt with the MSCOMM32.OCX control via MS Excel?

I have an application I build recently, but I would like to automate it a
bit. Every time I transfer the file from one PC to another, it takes a bit
of time to set up. Does anyone have any experience with this type of
automation?

The big problems are as follows:

Usually I have to make sure the PC it is going on has the MSCOMM32 file and
that it is registered with Windows.

Once that pain-staking task has taken place I have to add the MSCOMM
controls back to my userform.

After doing this all seems to be okay, but some of the items above can be
difficult on some PCs.

Can this type of thing be packaged and or automated?

--
Mark Ivey


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default MSCOMM32 Control

Dave,

That sounds great for the first half of this problem. I would be grateful if you could post your solution when possible.

Do you have any ideas on how to automate my code for a late binding scenario? I seem to have to re-add this control to my userform every time it is moved.

--
Mark Ivey
"Dave Patrick" wrote in message ...
I don't have it here but this can easily be accomplished. I use a two-line
CMD shell script that uses xcopy in the first line to copy the OCX to the
user's %systemroot%\system32 directory then use regsvr32.exe on the second
line to register the control as part of a small Access/Excel installation
routine.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Mark Ivey" wrote:
Has anyone ever dealt with the MSCOMM32.OCX control via MS Excel?

I have an application I build recently, but I would like to automate it a
bit. Every time I transfer the file from one PC to another, it takes a bit
of time to set up. Does anyone have any experience with this type of
automation?

The big problems are as follows:

Usually I have to make sure the PC it is going on has the MSCOMM32 file and
that it is registered with Windows.

Once that pain-staking task has taken place I have to add the MSCOMM
controls back to my userform.

After doing this all seems to be okay, but some of the items above can be
difficult on some PCs.

Can this type of thing be packaged and or automated?

--
Mark Ivey


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default MSCOMM32 Control

That shouldn't be necessary. All of my users are Windows XP now but it still
wasn't necessary when we were a mix of NT/2000/XP


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Mark Ivey" wrote:
Dave,

That sounds great for the first half of this problem. I would be grateful if
you could post your solution when possible.

Do you have any ideas on how to automate my code for a late binding
scenario? I seem to have to re-add this control to my userform every time it
is moved.

--
Mark Ivey


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default MSCOMM32 Control

Sorry it took so long. Here's an example of what you might use.

net use Z: /d
net use Z: \\naras0\maintdata$\Field_Elect\Registration
attrib -h %systemroot%\system32\mscomct2.ocx
regsvr32 /u /s %systemroot%\system32\mscomct2.ocx
xcopy Z:\mscomct2.ocx %systemroot%\system32 /h /q /v /y
regsvr32 /s %systemroot%\system32\mscomct2.ocx
net use Z: /d

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default MSCOMM32 Control

Dave,

I appreciate your response. I played around with the code a bit and made one of my own. You are welcome to use it if you would like...


--------------------------------------------------------------------------------

@echo off

IF EXIST C:\Windows\System32\MSCOMM32.OCX GOTO NOINSTALL

IF NOT EXIST C:\Windows\System32\MSCOMM32.OCX GOTO INSTALL




:NOINSTALL
echo.
echo MSCOMM32 is already on your system
echo.
@pause
GOTO END



:INSTALL
XCOPY MSCOMM32.OCX C:\Windows\System32 /V/-Y
echo.
echo MSCOMM32.OCX has been copied to your C:\Windows\System32 directory
echo.
@pause
echo.
echo Now the MSCOMM32.OCX file will be registered with the Windows registry
echo.
@pause
echo.
regsvr32 \windows\system32\MSCOMM32.OCX
echo.
echo Thank you for using the MSCOMM32 installer. Have a nice day!
echo.
@pause
GOTO END


:END


@echo on

--------------------------------------------------------------------------------


--
Mark Ivey
"Dave Patrick" wrote in message ...
Sorry it took so long. Here's an example of what you might use.

net use Z: /d
net use Z: \\naras0\maintdata$\Field_Elect\Registration
attrib -h %systemroot%\system32\mscomct2.ocx
regsvr32 /u /s %systemroot%\system32\mscomct2.ocx
xcopy Z:\mscomct2.ocx %systemroot%\system32 /h /q /v /y
regsvr32 /s %systemroot%\system32\mscomct2.ocx
net use Z: /d

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default MSCOMM32 Control

Glad to hear it helps.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Mark Ivey" wrote:
Dave,

I appreciate your response. I played around with the code a bit and made one
of my own. You are welcome to use it if you would like...


<snip


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
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
MSComm32 Axehandler Excel Programming 0 October 11th 04 12:44 AM
MsComm32.ocx not registered Eric Excel Programming 1 May 28th 04 10:52 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM
serial port mscomm32.ocx in excel Brian Excel Programming 0 July 25th 03 11:22 PM


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