microsoft.public.vb.crystal - Microsoft Visual Basic
Hello, I'm having problem inserting line break into one of the strings located in project resource. I've tried "Line1/nLine2" (from C#) and it wouldn't work. Tried Line1 + Environment.NewLine + Line2 also no luck. Is there any workaround even if it involves editing resources.xml file directly. Thanks, Pen D.
Hi, I have a string variable;- dim myString as String and need to add some newline characters to it, how is a newline char entered in VB? (I am using VB 6) thanks in advance lee
Hi, Below is userform code im working on and I believe im close .. but just can't seem to get it to work. I know my code isint proffesional at all, but I hope you get the idea of what I was doing. Code Objective: Open a document which contains a table , search col1 for the word that matches a textbox in the userform (which becomes the target row) then depending on what the user selects in the dropdown deteminds the target Col to add a bullet to the list. *Note opening the doc and every thing works just not the inserting a bullet Thank you to anyone that helps. Happy Holidays! Ben Z. CODE: Private Sub CommandButton1_Click() 'Works with custom toolbar Dim sendbar As CommandBar Dim sendbox As CommandBarControl Set sendbar = Application.CommandBars("Todays-Task") Set sendbox = sendbar.Controls(2) Set sendtopic = sendbar.Controls(1) Dim Word As New Word.Application Dim WordDoc As New Word.Document Word.Visible = True 'Only true during testing' Dim strPath As String 'Open word doc' C = ActiveDocument.CustomDocumentProperties("Task").Value strPath = "C:\MyDocuments\" & T & "\Planning\2007\Todos.doc" Set WordDoc = Word.Documents.Open(strPath) With WordDoc System.Cursor = wdCursorWait Dim oTbl As Table Dim oCll As Cell '<><><><><>Search Col(1) For Keyword<><><><><><><>' Set oTbl = WordDoc.Tables(1) With oTbl For Each oCll In .Columns(1).Cells If oCll.Range.Text = sendtopic.Text Then p = oCll.RowIndex End If Exit For Next End With '<><><><> Based on userform info<><><>' If ComboBox2.Text = "Pay" Then Set oTbl = WordDoc.Tables(1) Set Selec = oTbl.Cell(p, 4) With Selec .EndOf Unit:=wdCell .TypeText Text:=sendbox.Text End With WordDoc.SAVE WordDoc.Application.Quit System.Cursor = wdCursorNormal MsgBox "Task Updated" End Sub
Hi, I have following problem: I have a small piece of VBA code, that should insert a custom menu with one option. It works perfect, if I start DOC document with double-click. However, when I convert it to DOT, it doesn't work, neither when I put the file in the user Templates folder, nor in the StartUp folder of the Office, nor even, if DOT is opened with double-click. Adding the DOT as Add-In (Tools - Templates and Add-ins) doesn't help. I have tried both methods I know: with Document_Open / Document_Close in ThisDocument, as well as AutoOpen / AutoExit in a VBA-module. I very appreciate any help, Adam