A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#13 type mismatch error on user form for Dave Peterson



 
 
Thread Tools Display Modes
  #1  
Old January 17th, 2008, 05:02 PM posted to microsoft.public.excel.misc
Janis
external usenet poster
 
Posts: 267
Default #13 type mismatch error on user form for Dave Peterson

Dave can you check my last post. I checked through all the posts and it is
still not answered. thanks,
  #2  
Old January 17th, 2008, 05:23 PM posted to microsoft.public.excel.misc
Janis
external usenet poster
 
Posts: 267
Default #13 type mismatch error on user form for Dave Peterson

Dave or anyone can you tell me why there is a type 13 mismatch? it is urgent!
Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")


'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious)

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
ComboBox2.Clear
For Each c In Worksheets("patients").rng
ComboBox2.AddItem c.Value
Next c

End Sub
"Janis" wrote:

Dave can you check my last post. I checked through all the posts and it is
still not answered. thanks,

  #3  
Old January 17th, 2008, 05:36 PM posted to microsoft.public.excel.misc
Bob Phillips
external usenet poster
 
Posts: 5,994
Default #13 type mismatch error on user form for Dave Peterson

Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")

'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=ws.Range("A1"),
SearchDirection:=xlPrevious).Row

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
Me.ComboBox2.Clear
For Each c In rng
Me.ComboBox2.AddItem c.Value
Next c

End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Janis" wrote in message
...
Dave or anyone can you tell me why there is a type 13 mismatch? it is
urgent!
Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")


'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=[A1],
SearchDirection:=xlPrevious)

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
ComboBox2.Clear
For Each c In Worksheets("patients").rng
ComboBox2.AddItem c.Value
Next c

End Sub
"Janis" wrote:

Dave can you check my last post. I checked through all the posts and it
is
still not answered. thanks,



  #4  
Old January 17th, 2008, 05:38 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 19,791
Default #13 type mismatch error on user form for Dave Peterson

Check your other post.

Janis wrote:

Dave or anyone can you tell me why there is a type 13 mismatch? it is urgent!
Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")

'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious)

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
ComboBox2.Clear
For Each c In Worksheets("patients").rng
ComboBox2.AddItem c.Value
Next c

End Sub
"Janis" wrote:

Dave can you check my last post. I checked through all the posts and it is
still not answered. thanks,


--

Dave Peterson
  #5  
Old January 17th, 2008, 05:57 PM posted to microsoft.public.excel.misc
Janis
external usenet poster
 
Posts: 267
Default #13 type mismatch error on user form for Dave Peterson

All I can say is thank you. I couldn't go to work without htis. I will try
in the future not to re-post for hte same probelm. the worry is after
several answers usually no one reads it anymore.

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")

'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=ws.Range("A1"),
SearchDirection:=xlPrevious).Row

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
Me.ComboBox2.Clear
For Each c In rng
Me.ComboBox2.AddItem c.Value
Next c

End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Janis" wrote in message
...
Dave or anyone can you tell me why there is a type 13 mismatch? it is
urgent!
Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")


'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=[A1],
SearchDirection:=xlPrevious)

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
ComboBox2.Clear
For Each c In Worksheets("patients").rng
ComboBox2.AddItem c.Value
Next c

End Sub
"Janis" wrote:

Dave can you check my last post. I checked through all the posts and it
is
still not answered. thanks,




  #6  
Old January 17th, 2008, 07:35 PM posted to microsoft.public.excel.misc
Bob Phillips
external usenet poster
 
Posts: 5,994
Default #13 type mismatch error on user form for Dave Peterson

You would be surprised. Most of us regulars will watch a thread that we
join.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Janis" wrote in message
...
All I can say is thank you. I couldn't go to work without htis. I will
try
in the future not to re-post for hte same probelm. the worry is after
several answers usually no one reads it anymore.

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")

'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=ws.Range("A1"),
SearchDirection:=xlPrevious).Row

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
Me.ComboBox2.Clear
For Each c In rng
Me.ComboBox2.AddItem c.Value
Next c

End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Janis" wrote in message
...
Dave or anyone can you tell me why there is a type 13 mismatch? it is
urgent!
Private Sub UserForm_Initialize()

Dim intLastRow As Integer
Dim ws As Worksheet
Dim c As Range
Dim rng As Range
Set ws = ThisWorkbook.Worksheets("patients")


'intLastRow = ws.SpecialCells(xlCellTypeLastCell).Row
intLastRow = Cells.Find(What:="*", After:=[A1],
SearchDirection:=xlPrevious)

Set rng = Worksheets("patients").Range("A1:A" & intLastRow)

'Set rng = ws.Range("A1:A" & intLastRow)
ComboBox2.Clear
For Each c In Worksheets("patients").rng
ComboBox2.AddItem c.Value
Next c

End Sub
"Janis" wrote:

Dave can you check my last post. I checked through all the posts and
it
is
still not answered. thanks,






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:40 PM.


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