powersoft.public.powerbuilder.general

Can someone help me please.

I am using PB7 Build 8033 and Excel 97 SR1

I have a spreadsheet which has 1 chart "graph", and 2 sheets "Model" and
"Calculations". There are also 7 macros in module 1.

I am trying to use OLE Automation to link to the spreadsheet, I need to
populate some cells, run some macros and retreive some cells.

I can get excel and the spreadsheet to open in automation mode, I can
retreive and populate individual cell value, and I can successfully close
and disconnect from excel and the spreadsheet.

My problem is that I cannot successfully access the macros. The code below
is what I am using. When the spreadsheet is run on its own, the macros work
fine, all the calculations are ok. No problems at all. When I try to use
automation, the macros are accessed and errors occur. The errors are type
mismatch when trying to collect a date into a variable. ( all var decs ok
and spreadsheet values are of correct format.) In debug mode on this line
error 2026 was noted.

I am using the workbooks.open method , (it works the same with
workbooks.add) as seen below, I was wondering if i need to open other sheets
or modules somehow, or do I need to open the spreadsheet using other
commands.

If I open the spreadsheet using Run( "excel.exe" "c:\test.xls") and then
access the macros using
myoleobject.application.Run("test.xls!update_model"), the macros run fine,
but unfortunately this is not hidden from the user (minimised is not good
enough unfortunately)

Can someone please help me, as I have searched many sources to no avail.
___________________________________________________________________________


integer li_ret
decimal ld_ret
string path,file
oleobject myoleobject

// connect to excel via OLE Automation OK
myoleobject = create oleobject
li_ret=myoleobject.connecttonewobject("excel.application")

path = "c:"
file = "test.xls"

// open spreadsheet within excel OK
myoleobject.workbooks.open(path + "\" + file)

// retreive from spreadsheet OK
ld_ret =
myoleobject.application.workbooks(1).worksheets("Calculations").cells(3,5).v
alue
sle_res2.text = string(ld_ret)

// populate spreadsheet  OK
myoleobject.application.workbooks(1).worksheets("Model").cells(1,1).value =
25

// run macro--NOT OK
myoleobject.application.Run("test.xls!update_model")

// set excel "Saved" property so that quit does not ask user to save
// changes back spreadsheet  OK
myoleobject.application.workbooks(1).saved = true
myoleobject.application.quit()


// disconnect and destroy oleobject which also closes the
// excel process running via ole automation in memory
// (can be seen via Task Manager (processess))  OK

li_ret=myoleobject.disconnectobject()
destroy myoleobject
 __________________________

  Hafiz Choudhury
  LYNX FINANCIAL SYSTEMS
  Work:  (44) 01582 866000
  Direct: (44) 01582 845074
  Fax:      (44) 01582 866927
  Email:   HafizC@lfs.co.uk
 __________________________





0
Hafiz
7/11/2000 5:20:28 PM
sybase.ole-ocx-activex 6324 articles. 0 followers. Follow

0 Replies
911 Views

Similar Articles

[PageSpeed] 51

Reply:

Similar Artilces:

how can i use powerbuilder to develop an activex/ole/ocx? help me please!!!
Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] MySybase -- http://www.sybase.com/mysybase "tadsun" <tadsun@163.com> wrote in message news:jIQ8Mt7BCHA.200@forums.sybase.com... > > > ...

[PATCH] GNU Public General Public General GNU Public License License
--- pod/perlgpl.pod 2003/08/13 18:07:09 1.1 +++ pod/perlgpl.pod 2003/08/13 18:07:14 @@ -1,7 +1,7 @@ =head1 NAME -perlgpl -- the GNU Public General Public License, version 2 +perlgpl - the GNU General Public License, version 2 =head1 SYNOPSIS --- pod/perlartistic.pod 2003/08/13 18:07:30 1.1 +++ pod/perlartistic.pod 2003/08/13 18:07:31 @@ -1,7 +1,7 @@ =head1 NAME -perlartistic -- the Perl Artistic License +perlartistic - the Perl Artistic License =head1 SYNOPSIS -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern/ It'...

PowerBuilder Bugs: Using VB ActiveX control (OCX) in PowerBuilder 6.0
I'm going to write some VB ActiveX control (using Microsoft VB6.0 SP3) to be used in PowerBuiler 6.5, but I found that it's very easy to crash in PowerBuilder, Here is the test case: 1) Create a very simple VB ActiveX control (only one button without any script) in Visual Basic 2) Create a PB project to open a Main Window (w_1) with an ole object of VB ActiveX control 3) Open another Window (w_2) with an ole object of VB ActiveX control (can be same as previous or other control) 4) Click the OLE object in w_2 to make it get focus 5) Close w_2 -> it will crashed If ...

insert ActiveX
I want to use MSCOMM32.ocx in powerbuilder. First, run regsver32.exe to registor it. Then, I use powerbuilder to insert object by OLE. But messagebox show "ole file is failed, license file is required." I don't know how to registor it. Help me!!! regsvr32 MSCOMM32.ocx assuming you are in the directory that the file resides in. <Halina> wrote in message news:640181D0D99A3028002A452185256A7E.002A453285256A7E@webforums... > I want to use MSCOMM32.ocx in powerbuilder. First, run regsver32.exe to > registor it. Then, I use powerbuilder to insert object b...

Welcome to the OLE-OCX-ACTIVEX newsgroup
Welcome to the OLE-OCX-ACTIVEX newsgroup. This is a forum for discussion on topics related to the usage of OLE, OCX and ACTIVEX with PowerBuilder. Feel free to post questions about the product, concerns about your development needs for enhancements and any other feedback. All posted messages will be in the public domain and may be republished on Powersoft's InfoBase CD ROM as well as on our WebSite in order to provide information that is extremely valuable to other developers. This is NOT Powersoft Technical Support and it is not the purpose of this newsgroup service to allo...

my powersoft.public.powerbuilder.pfc is broken?
My powersoft.public.powerbuilder.pfc is stuck at 4938 messages since a long time. I suspect there is a problem with my news reader (N4). Anybody know a fix? Others groups are fine. Thanks in advance. -- Real Gagnon mailto:real.gagnon@tactika.com Quebec, Canada **** Java Javascript and PowerBuilder How-to **** New Location! http://www.tactika.com/realhome/ No Ads or Popups! I had the same problem with a different ng some time ago. It was caused by a corrupt file on my PC, and was only fixed by removing the ng and adding it back (thus losing the record of which message ...

Recompile PowerBuilder applicarion as ActiveX or OCX
Is it possible to recompile an existing PowerBuilder 5 application as an ActiveX or OCX component that can then be embedded into a Visual Basic application. Basically I would like to reuse an existing PowerBuilder app (or at least sections of it) as part of a new application developed within VB so that it looks like and behaves like a single application. Many thanks Oliver See Application Techniques documentation for the topic "Runtime Automation Server" /ck <Oliver_Lennon> wrote in message news:575D3149D64D5D9F007CF8AE85256C6F.007CF8BE85256C6F@webforums....

Is powersoft.public.powerbuilder.pfc dead?
I have tried to post a question to powersoft.public.powerbuilder.pfc but the last post I see is from 5 January. Is there a problem with the group? Gerry. The newsgroups were down for 1.5 days last week. I can see posts after 01/09/2002. You may need to reset your local copy of the newsgroup to get back in sync. /ck "Gerry" <gerico@xs4all.nl> wrote in message news:z7pIA8TnBHA.297@forums.sybase.com... > I have tried to post a question to powersoft.public.powerbuilder.pfc but the > last post I see is from 5 January. Is there a problem with the group? &...

Why do more ActiveX OCX controls show up in Excel than PowerBuilder
I am brutally frustrated. I am still using PB5.0.4 - I know there are more updated versions. But I still shouldn't have the problems I am experiencing. Why is it that Microsoft's Web ActiveX control shows up in Excel's toolbox list of active x controls but it doesn't show up in my PB toolbox? I am using Windows NT 4.0 SP4, I was told that a friend can see the controls in Windows 95 of the same PB version. Its not just the MS Web Control, I experienced this problem with Dart Communciations http control also. Interestingly enough, the package which contain Dart's ht...

VB COM (ActiveX dll) OLE from Powerbuilder 10.5
Hello, I have folder/file backup function in my application. To notify the PB window of the progress and status of the backup I use the CopyFileEx (which uses callback) windows api function in visual basic to achieve the file backup The VB project has one main module and one class. The module contains the callback function (the function that will be called by CopyFileEx to notify about the changes and progress of the copy. It also contains the caller function that initiate the CopyFileEx. All that the callback function does is to send a message to a registered PB window ab...

Pocket PowerBuilder blob problem from ianywhere.public.chinese.general
I'm posting on behalf of a customer in ianywhere.public.chinese.general. I have translated the message will be redirecting the customer to this thread A customer is using PocketPowerBuilder 1.5 to develop applications on Windows CE 4.0 devices. One of the function is to browse pictures in file directories. The customer claims that, though PPB claims to not support JPG, under Windows 2000, using the PictureName picture setting controls he managed to display pictures normally. But on Windows CE. these JPG files cannot be properly displayed. The customer has no problems dis...

Trigger firing: nested or not nested? (Reposted from powersoft.public.powerbuilder.database)
Hi to all, We are using PB 7.0.3.10009 with ASA 6 and 7 and MSSQL 7. Consider the following: table my_table has a trigger called t_my_table_d for delete. In the trigger there is an UPDATE statement that affects a record in my_table table. Such record is not the DELETEd one. In this situation, when I delete a arecord in my_table, ASA and MSSQL behaviours are different: in ASA, the UPDATE statement in the delete trigger (t_my_table_u) will not fire the update trigger (say t_my_table_u), while MSSQL will. My questions are: 1 - I have found the way to enable or disable nested triggers ...

problem with Powerbuilder 9 and Adobe Acrobat 7.0
I=92m using PB9.0 =96 Build 5507 on WinXP Professional. After I update my Adobe Acrobat to 7.0, I could no longer insert an =93Adobe Acrobat OCX for Active X=94 Any ideas how to resolve this?? Thanks Bob Bob H. wrote: > I�m using PB9.0 � Build 5507 on WinXP Professional. > After I update my Adobe Acrobat to 7.0, I could no longer > insert an �Adobe Acrobat OCX for Active X� > > Any ideas how to resolve this?? > > Thanks > > Bob Insert the IE browser control and use it's navigate() method to load the PDF. Acrobat will automaticall...

can i use pb's automation server to create an activex/ole/ocx? help me!
Please do not cross-post. -- <hopethishelps/> Roy Kiesler [TeamSybase] MySybase -- http://www.sybase.com/mysybase "tadsun" <tadsun@163.com> wrote in message news:UXo0Ru7BCHA.201@forums.sybase.com... > > > ...

HELP NEEDED: OCX's created from JavaBeans (using ActiveX bridge) hang PowerBuilder 6.0
I recently downloaded PowerBuilder 6.0 Desktop for evaluation purposes. I am trying to add an OCX created from a java bean using Sun's ActiveX bridge. I can add the OCX ok... but when I attempt to save my application afterwards PowerBuilder hangs. CPU goes full throttle. I have tried all of the sample OCX's from the JAVA BDK. They all hang PowerBuilder. The OCX's work fine in other containers, i.e. Word, Excel, PowerPoint.... Has anyone else tried this ? Any help would be greatly appreciated. Danny danm@telexiscorp.com ...

ActiveX, OCX
I have ActiveX and OCX resources built for Win32 that I need to incorporate to WinCE in PocketBuilder. I tried trough an external visual object but it asks for DLL as the library name. How can I use ActiveX and OCX objects for WinCE in PocketBuilder? rgds, SS ActiveX and OCX are not supported in PocketBuilder. <SS> wrote in message news:42eb46e3.449a.1681692777@sybase.com... >I have ActiveX and OCX resources built for Win32 that I need > to incorporate to WinCE in PocketBuilder. > I tried trough an external visual object but it asks for DLL > as the librar...

New to OCX : How can we access OLE, OCX events and properties
Hi Everyone I have never used OCX, OLE controls, my question is how can we access their events how can we access their properties Thanks There events should be posted along with regular PB events. Access properties and methods with the .OBJECT keyword. i.e. oleobject_1.object.property = ?? Craig Gluck mohammed Al <yagalhaj@aol.com> wrote in article <345E17F5.D6F6A994@aol.com>... > Hi Everyone > I have never used OCX, OLE controls, my question is > how can we access their events > how can we access their properties > > Thanks >...

What generals generally do
Reading a McChrystal thread elsewhere, I came across someone quoting a US general http://en.wikipedia.org/wiki/Smedley_Butler > I spent 33 years and four months in active military service and > during that period I spent most of my time as a high class thug for > Big Business, for Wall Street and the bankers. In short, I was a > racketeer, a gangster for capitalism. I helped make Mexico and > especially Tampico safe for American oil interests in 1914. I helped > make Haiti and Cuba a decent place for the National City Bank boys to > collect revenues in. I ...

OCX and Powerbuilder
Hi, I want to use 2 ocx controls WMList.ocx ( ObjectListControl ) and WMQuery.ocx ( QueryControl) in PowerBuilder, the QueryControl.GetList method returns Object and I am able to successfully use it but ObjectListControl.GetList method returns MSComctlLib.listview and I am unable to use it successfully, I have tried it with simple declaring oleobject as following oleobject lole_objectlist and then we came up with exception, and if we try it with type ( any ) then we are unable to get the class name with method ClassName(any) Any help regarding usage of OCX Control ( Obj...

OCX/ActiveX
Can I use OCX/ActiveX with WebForms ? No, that is not a supported feature. They do work with Windows Forms however. Regards, Dave Fish Sybase On 10 Jul 2007 08:43:19 -0700, "Mohammad Alhabibi" <malhabibi@yalla.com> wrote: >Can I use OCX/ActiveX with WebForms ? > But Browser activex in Winform don't works. "Dave Fish [TeamSybase]" <dfish@[N0Spam]sybase.com> wrote in message news:40k7939bkbj0652duqhk48bo9trevvngsc@4ax.com... > No, that is not a supported feature. They do work with Windows Forms > however. > >...

OCX, ActiveX
Hi there. I�m looking for a component in which I can create a graph with two Y axes (2 different scales). The idea is to achieve something like excel does with one of its graph types (the "lines in two axes" one) but I don�t want to use excel like an ole object because its menu appears and this is an effect unwished for the application I�m working in. I hope to be clear regarding this issue and if somebody could help me I�d really appreciate it !!! Thanks in advance. C�sar Bernal Mapas y Datos S.A. These guys probably have something that will work for you:...

OCX and Powerbuilder
I have a window in which I have an .ocx - ole_name. When I do the following: ole_name.object.method_name() it works just fine. However, when I put the .ocx on a user object (u_userobj) - separate from the window - and call it from my window, it blows up. Here's my syntax from within the window: u_userobj u_uo u_uo = create u_userobj u_uo.ole_name.object.method_name() Any help would be appreciated. Thanks Visual user objects are created using the OpenUserObject() method -- the CREATE statement should only be used for non-visual objects. -- <hopethishelp...

How can I view properties of OCX's in debugger? OCX woe in general
I'm trying to debug a PB app that uses a couple of ocxs. If I stop in one of the ocx events, I can't see any of it's properties. I'm really having a tough time with OCX in general - many of them give me errors like "external object xyz property abc not accessible", even though the browser shows me the property, and I use the proper type of var. I'm using 5.0.3 - I assume I didn't need the interim patches between 5.0 and this set - right? Thanks for any ideas Joe ...

Web resources about - powersoft.public.powerbuilder.general - sybase.ole-ocx-activex

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 2/18/2016 4:14:41 PM