Thread
:
Help with Error: Type Mismatch
View Single Post
#
1
Posted to microsoft.public.excel.programming
rleonard[_2_]
external usenet poster
Posts: 9
Help with Error: Type Mismatch
When I run the following macros they copy and paste data correctly; but if I answer no re entering another sub score i
macro CopySun01Scores I get error messag re type mismatch! Note the macro to copy Sub02,03 & 04 are the same as copy sub01, except where data is stored
Also when I enter SUB01 in input box, if I forget and enter it in lower case the If ..Run does not work! What do I have to change so it accept Upper or Lower case input
This is my first time trying to enter several If conditions in one macro
Thanks for any hel
Bob Leonar
Sub CopySubScoresToGroups(
Application.Goto reference:="SubDataArea
Dim varInput As Strin
Range("SUB_ToCopy").Selec
varInput = InputBox("Enter SUB##"
Selection.Value = varInpu
If Selection.Value = "SUB01" Then
Application.Run "CopySub01Scores
If Selection.Value = "SUB02" Then
Application.Run "CopySub02Scores
If Selection.Value = "SUB03" Then
Application.Run "CopySub03Scores
If Selection.Value = "SUB04" The
Application.Run "CopySub04Scores
Els
Application.Goto reference:="SubDataArea
End I
End Su
----------------------------------------------------------------------------------
Sub CopySub01Scores(
Application.Goto reference:="SubDataArea
Application.Goto reference:="Sub01
Selection.Cop
Range(Range("SUB01_CellPaste").Value).Selec
ans = MsgBox(" Is this correct cell to enter Sub Score", vbYesNo
If ans = vbNo Then
Exit Su
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
False, Transpose:=Fals
ans = MsgBox(" Enter another Sub Score", vbYesNo
If ans = vbNo Then
Exit Su
CopySubScoresToGroup
End Sub
Reply With Quote
rleonard[_2_]
View Public Profile
Find all posts by rleonard[_2_]