Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default type mismatch error

Hi All, I am trying to update two sheets in different workbooks with the same
user input accepted through userform and I am getting a type mismatch error.
Here is where I am getting the error:

If Male.Value = True Then
ws.Cells(iRow, 2).Value = "Yes" And wst.Cells(2, 2).Value = "Yes"
End If

ws and wst are two seperate sheets in two seperate workbooks.

Thanks in Advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default type mismatch error

hi Sam,
try it this way:

If Male.Value = True Then
ws.Cells(iRow, 2).Value = "Yes"
wst.Cells(2, 2).Value = "Yes"
End If
--
jb


"sam" wrote:

Hi All, I am trying to update two sheets in different workbooks with the same
user input accepted through userform and I am getting a type mismatch error.
Here is where I am getting the error:

If Male.Value = True Then
ws.Cells(iRow, 2).Value = "Yes" And wst.Cells(2, 2).Value = "Yes"
End If

ws and wst are two seperate sheets in two seperate workbooks.

Thanks in Advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default type mismatch error

that works great! Thank you

"john" wrote:

hi Sam,
try it this way:

If Male.Value = True Then
ws.Cells(iRow, 2).Value = "Yes"
wst.Cells(2, 2).Value = "Yes"
End If
--
jb


"sam" wrote:

Hi All, I am trying to update two sheets in different workbooks with the same
user input accepted through userform and I am getting a type mismatch error.
Here is where I am getting the error:

If Male.Value = True Then
ws.Cells(iRow, 2).Value = "Yes" And wst.Cells(2, 2).Value = "Yes"
End If

ws and wst are two seperate sheets in two seperate workbooks.

Thanks in Advance

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
runtime error 13 - type mismatch error in Excel 97 on Citrix Kevin Maher Excel Programming 7 March 8th 08 11:48 AM
Conditional Formatting - Run Time Error '13' Type Mismatch Error ksp Excel Programming 0 July 11th 06 07:06 AM
Help: Compile error: type mismatch: array or user defined type expected lvcha.gouqizi Excel Programming 1 October 31st 05 08:20 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM


All times are GMT +1. The time now is 08:08 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"