Thread
:
Still having VBA problems
View Single Post
#
2
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Still having VBA problems
Try this idea where your variable is PUBLIC. Copy these into a modulef5
usemyvar to see nothingthen f5 putmyvar and then execute usemyvar. The
public is erased on leaving the file.
Public myvar
Sub putmyvar()
myvar = 2
End Sub
Sub usemyvar()
MsgBox myvar
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Preschool Mike" wrote in message
...
What I'm trying to do is collect the contents of cell BC8 on Sheet
(Grade1)
if the cell E5 on sheet (Grade1) says August and store the information in
my
Dim AugustG1A statment. Then using my InsertFirstGrade sub I want to send
the information in AugustG1A to cell T7 on sheet (SpGrade1). Any help
writing this correctly would be much appreciated. My Collect1stGrade does
not collect the contents of sheet (Grade1) from cell (E5) and store it in
the
Dim AugustG1A.
Dim AugustG1A As Integer
Sub ClearMonths()
AugustG1A = 0
End Sub
Sub Collect1stGrade() 'This code does not work
If Range("'Grade1'!E5") = "August" Then
AugustG1A = Range("'Goal1'!BC8")
End If
End Sub
Sub InsertFirstGrade()
Range("'SpGrade1'!T7") = AugustG1A
End Sub
I tried this suggested code but it did not work as well.
For the VBA part:
replace:
Range("'Grade1'!E5")
with:
Sheets("Grade1").Range("E5")
--
Gary''s Student - gsnu200901
--
Mike Mast
Special Education Preschool Teacher
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett