C++/VB - 2 questions about TreeView in VB in Excel
Asked By JimAnAmateu
22-Mar-07 01:37 PM
I am making a macro to build/use a TreeView for structuring/viewing/editing
the content in an Excel file (Excel 2003).
Two questions I hope you experts out there may help me with:
1) How to determine if a node is a leaf node?
2) How to determine if a key is not already in use and thus unique?
Jim
Excel
(1)
VB
(1)
TreeView
(1)
JimAnAmateur
(1)
VBA
(1)
JimRe
(1)
DCE
(1)
DA
(1)
Bob Butler replied...
VB isn't in Excel, VBA is. You should ask in an Excel VBA group.
In VB you would:
1) check if the node.Parent Is Nothing
2) try to access the node by the key, or just add a new one, and trap the
error
--
Reply to the group so all can participate
VB.Net: "Fool me once..."
JimAnAmateu replied...
Thanks, Bob!
I have now moved to Excel.
br Jim
Controlling Minimize, Maximize and Close Menu Buttons C++ / VB Access 2007 Windows XP SP3 There appear to be two approaches to controlling the Minimize get at least one of the approaches to work accross all three menu / button items? VB WinAPI Discussions Windows XP (1) Application.hWndAccessApp (1) Office 2003 (1) Access 2007 (1) VSTO (1) VBA (1) VB (1) VBAEditor (1) Hello Sarberman, This newsgroup is for vb6. It seems you are working in Access VBA, right? I can see the same thread you raise in MSDN VBA forum. Since it is not a topic in this newsgroup, we will have discussions there Colbert Zhou Microsoft Online Support Team I raised it there and then realized that MSDN VBA forum is not listed in Priority Subscriber Support in MSDN Forums and Newsgroups. This one is. In addition, VBA is VB 6.5 and this is a WinAPI question. However, if you prefer the
system32 \ tskill.exe And EXCEL by VBS file. . . C++ / VB Hi. I got a job about writing some txt files into a Excel sheet. Some text1: value1 Some text2: value2 . . . and so on. . . So today I wrote a A problem I found was that if one said something wrong to the msgBoxes from Excel, or whatever, then it could freeze the sheet. . . To avoid that, I simply used the Say No to the first question, and the freeze problem is gone :) My knowlede about Excel syntax is almost one line, something like this: oExcelSheet.cells(1, 1).value so any if not fso.folderExists(sTargetPath) _ then fso.createFolder(sTargetPath) ' sExcelEXE = "%ProgramFiles% \ Microsoft Office \ Office10 \ Excel.exe" sExcelEXE = fso.getAbsolutePathName(wso._ expandEnvironmentStrings(sExcelEXE)) if not fso.fileExists(sExcelEXE) then sExcelEXE = "excel.exe" ' sVer = fso.getFileVersion(sExcelEXE) if sVer = "" then sVer = "?" ' wScript.echo """excel.exe"", ver " & sVer sVer = fso.getFileVersion(wScript.fullName) wScript.echo wScript.name & ", ver " & sVer & vbCrLf
Excell DLL (Created in VB6) problem C++ / VB Hi folks, I tried to create a dll library for Excel VBA but I got an error message which is out of my knowlege. Please help. In VB, I created two class modules. clCExcel: Option Explicit Private ShtName As test.clName Public Property clName End Sub clName: Public Function SN(strSheet As Integer) As String Dim XLApp As Excel.Application SN = XLApp.ActiveWorkbook.Sheets(strSheet).Name End Function Then, I compiled it to dll and registed it. After all, I added the library to Excel vba and had the following code to call it. Public Sub test2() Dim xlFunction As test xlFunction.pShtName.sn(1) End Sub Any help will be appreciated. Thanks in advance. Tim VB COM Discussions Workbook.VBProject.References.AddFromFile (1) XLApp.ActiveWorkbook.Sheets (1) MyExternalObj.ChangeCell (1) XLApp
read office files using ole32.dll C++ / VB Hi there, I want to read my Office Files (DOC, XLS and PPT) files using Thank you miztaken Win32 OLE Discussions Visual Studio (1) PowerPoint (1) GetTypedObjectForIUnknown (1) Office (1) Excel (1) VB (1) PtrToPersistStorage (1) StgCreateDocfile (1) Solutions should be determined after requirements are specified. You are DOC itself. r u getting me? thank you For any inserted Office document, examples include Excel Spreadsheet, Power Point Presentation, Visio, etc., extraction is easy. These documents can all be extracted load and save these documents. Use CoCreateInstance to instantiate the OLE Auomation Application(i.e., Excel, Power Point, Visio, etc). I gave the recipe in one of my previous posting in your thread. The only problem with excel files is that once extracted they are invisible. You must make them visible to see group / microsoft.public.dotnet.framework.interop / browse_thread / thread / 2ce134250d3d061b / 64d73629838242f4?hl = en&lnk = st&q = excel+michael+phillips#64d73629838242f4 I have not tried inserted images. However using the DFViewer, I see me say by computing binaries only? Also i viewed the code you provided to extract excel, i suppose it do not require creating an instance of EXCEL. Is this true? By
Application.OnTime Not Working C++ / VB I have created the following VBS code: MyTest Set objExcel = CreateObject("Excel.Application") MsgBox "Before OnTime" objExcel.Application.OnTime Now + TimeValue("00:00:05"), "MyTest" MsgBox "After happening since I am not getting any errors. Any help would be appreciated. VBScript Discussions Excel (1) Application.OnTime (1) VBA (1) ObjExcel.Application.OnTime (1) VBScript (1) CreateObject (1) TimeValue (1) GetRef (1) I cannot run it because I do not have Excel, but what exactly are you trying to do? Do you want "mytest()" to run once illustrates them. The first is due to the fact that you exit your program before Excel has a chance to do anything. When you exit the VBScript program, the Excel directive goes away, too. So sorry. You have to specifically insist that Excel not go away just yet by ensuring that your program not away as the below