hi i´ve got two subroutines: the first looks like
Sub SME_novaRubrika()
Dim rubrika As String
Dim datum As String
datum = InputBox("Zadaj datum pre clanky", "DATUM", 2004)
rubrika = InputBox("Zadaj nazov rubriky pre clanky", "RUBRIKA")
then i have another subroutine, in which i want to use actually assigned
variable datum from the first subroutine. thanks for help
Bear - 22 Jun 2007 23:51 GMT
Raraschek:
You can dimension the variables at the module level, rather than at the
subroutine level. Then all subroutines in the module can access the variables.
Bear

Signature
Windows XP, Word 2000
> hi i´ve got two subroutines: the first looks like
> Sub SME_novaRubrika()
[quoted text clipped - 6 lines]
> then i have another subroutine, in which i want to use actually assigned
> variable datum from the first subroutine. thanks for help
Bear - 22 Jun 2007 23:54 GMT
Raraschek:
You can dimension the variables at the module level (in the Declarations
section) rather than in the subroutines. That way all subroutines in the
module can access the variables.
Bear

Signature
Windows XP, Word 2000
> hi i´ve got two subroutines: the first looks like
> Sub SME_novaRubrika()
[quoted text clipped - 6 lines]
> then i have another subroutine, in which i want to use actually assigned
> variable datum from the first subroutine. thanks for help
Doug Robbins - Word MVP - 23 Jun 2007 05:49 GMT
Delete the
Dim rubrika As String
Dim datum As String
and at the top of the code window, insert
Public rubrika As String
Public datum As String

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> hi i´ve got two subroutines: the first looks like
> Sub SME_novaRubrika()
[quoted text clipped - 6 lines]
> then i have another subroutine, in which i want to use actually assigned
> variable datum from the first subroutine. thanks for help