|
-
Mar 22nd, 2000, 12:46 AM
#1
Thread Starter
Fanatic Member
So I right-click on my toolbox and left-click on Components, and there's a tab called "Insertable Objects", from which you can select, amongst other things, "Microsoft Excel Worksheet". And you can then paint an excel sheet onto your form. But then how the hell do you get at it's properties (like normal Excel ones - Range etc., not the fifteen that it gives you automatically)?
I think I'd really like to be able to use this feature, but damned if I can figure out how.
HDR has been a great deal of help to me, but unfortunately not with embedded (am I using the right terminology here?) sheets. Thanks HDR!!!
-
Mar 22nd, 2000, 05:00 AM
#2
Addicted Member
Using an Excel control sounds really neat, and I would like to find out about it so I can use it. But I sure can't find anything out about it. I've searched MSDN, and the microsoft web sites, not a single hit. I have also looked at it's properties, methods, and events. Nothing useful there either. My guess is that it probably is there for some specific internal-to-Microsoft use that isn't really documented. I'm checking the office 2000 developer cd next. I'll let you know if I find anything.
-
Mar 22nd, 2000, 05:32 AM
#3
Addicted Member
Nothing on the Office 2000 developer resource kit CDs or on the MSDN Office 2000 developer libraries. I think you are out of luck. Sorry.
-
Mar 22nd, 2000, 05:09 PM
#4
Thread Starter
Fanatic Member
Cheers HDR! Shame eh? Oh well, the other method you told me works fine anyway. Do you know if it's poss for me to edit a worksheet in that way and then open it within a vb form? I'm a control freak, you see, can't let them evil users get to messing with things they shouldn't.
Thanks again!
-
Mar 22nd, 2000, 08:16 PM
#5
Hyperactive Member
I'm interested in this too....how are you adding the Excel sheet?
I keep getting 'System error &H80070001 (-2147024895)'
I can insert word documents and excel graphs but not sheets?
Can you help me?

Dan
-
Mar 22nd, 2000, 10:20 PM
#6
Thread Starter
Fanatic Member
Judd, I assume you're not talking about the "painting the sheet on the form" bit, so here is the way HDR showed me to edit a new excel sheet (sort of external to VB).
Private xlOut As Excel.Application
Set xlOut = CreateObject("Excel.Application")
' You put in path and file name.
xlOut.Workbooks.Open xlOutPath & xlOutFileName & ".xls"
' If you want to see it, uncomment.
'xlOut.Visible = True
' You put in the name of the worksheet,
xlOut.Worksheets(xlOutWorkSheetName).Activate
' and the row and column.
xlOut.Worksheets(xlOutWorkSheetName).Cells(intOutRow, intOutColumn) = Data
xlOut.ActiveWorkbook.Close SaveChanges:=True
Set xlOut = Nothing
xlOut.Quit
-
Mar 22nd, 2000, 10:55 PM
#7
Hyperactive Member
Actually, I was 
I've create external excel sheets before, by the method you mention (thanks anyway).
I can't add the control to the form...strange because I can add a chart which apparently uses the same control...(and includes a sheet!!!!!)

Dan
-
Mar 23rd, 2000, 12:26 AM
#8
New Member
API
Shirley there's an API for you to screenshoot the Excel window and get an hDC for it, or if you have to, pick up the .bmp off the disk and paint it or put it in frm*.Picture...Shirley... 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|