Word - Return value from another form

Asked By DMc2007
03-Sep-08 05:17 AM
Hi

how can i using VBa return a value from another form. The form will be
hidden.

Regards

D
Office XP
(1)
Vista
(1)
WordVBA
(1)
Germany
(1)
Bavaria
(1)
Userform1
(1)
Userform2
(1)
  Helmut Weber replied...
03-Sep-08 06:45 AM
Hi,

Sub Macro8()
UserForm1.Show
UserForm2.Show ' userform2 is hidden
End Sub

' in userform1
Private Sub CommandButton1_Click()
MsgBox UserForm2.TextBox1.Text
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
help
End With ActiveDocument.Tables(1).Rows(2).Range.Font.Hidden = True End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Hi Helmut, I have no problem trying to hide rows, especially when I know exactly place the cursor in the cell with the text that serves as filter. - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP When using your WORD filter macro
oTbl.Range.Cells.Count).Range Then Exit Sub Wend Next Next End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Thank you, I cannot wait to try this out! - - Message posted via OfficeKB.com http If ocll.Next Is Nothing Then Exit Sub Wend Next Next End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Hi Helmut- I am now back
Next i Set oFF = Nothing Hi LEU, try CStr(i): (“WC” & Cstr(i)) - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP . . . also: compare: vs - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Hi Helmut, These both look the
000") & ".doc" dDc2.Close Next Set dDc1 = Nothing Set dDc2 = Nothing End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Dim iDoc As Integer ' number of dcouments Dim dDc1 As Document ' active document Dim dDc2 000") & ".doc" dDc2.Close Next Set dDc1 = Nothing Set dDc2 = Nothing End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Sorry, I'm no good today
open the specified folder (e.g. "C: \ Documents and Setting \ Anton Kokin \ Application Data \ Microsoft \ Office \ Recent") if name's user (e.g. "Anton Kokin") maybe is different? If this code Sub getSpecFolder() With Dialogs(wdDialogFileOpen) .Name = "C: \ Documents and Setting \ Anton Kokin \ Application Data \ Microsoft \ Office \ Recent \ " if .Display = -1 Then MsgBox .Name End If End With End Sub The path computer? Hi Anton, user = Environ$("Username") & " \ " plus .Name = "C: \ Dokumente und Einstellungen \ " & User & "*.*" - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Word 2002, Windows XP (german versions) Hi Anton, Sub getSpecFolder() Dim user As String user = Environ$("Username") With Dialogs Excel \ " ' ok .name = "C: \ Office2003 \ " ' ok MsgBox .name .Show End With End Sub - - Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP Actually, it might be better to