Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
Type Mismatch Error - Help Please Launchnet Excel Worksheet Functions 5 July 20th 07 04:35 AM
Type Mismatch Error David Excel Discussion (Misc queries) 2 December 11th 05 04:46 PM
Why type mismatch - R/T error 13 Jim May Excel Discussion (Misc queries) 5 January 9th 05 06:45 PM
Type Mismatch Error SRS Man[_2_] Excel Programming 3 April 16th 04 03:49 PM


All times are GMT +1. The time now is 01:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"