Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Controling Excel using Word VBA

Asked and answered. I was just about to post a question about that!

Thanks very much, i'll let you know how it turns put.

Z

"Bernie Deitrick" wrote:

Z,

D'Oh! <Head smack

You'll need to correct my errors:

xlSht.Cells(xlSht.Rows.Count, xlCell.Column).....

Since xlCell is nothing, this will blow up....

Instead, put this declaration at the top
Dim mySRange As Excel.Range


Then use this three times, as in the last example:

myValue = ComboBox1.Value
' set search range for ComboBox1 Values
Set mySRange = xlSht.Range("A:A")
Set xlCell = mySRange.Find(myValue)
If xlCell Is Nothing Then ' add the value to the set at the bottom
xlSht.Cells(xlSht.Rows.Count, mySRange.Column).End(xlUp)(2).Value = myValue
End If

etc...

Sorry about that...

Bernie
MS Excel MVP


"Zoltar54" wrote in message
...
Bernie,

Very much appreciated. I will give it a go and see if it works.

Thanks agaian,

Z




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
controling a .xls from another .xls on-a-mission New Users to Excel 2 February 17th 06 06:28 AM
Excel User Form using 2 Combo Box with 1st Combon controling the 2 ca1358 Excel Programming 1 January 6th 06 12:27 AM
Controling Acrobat PDFs No Name Excel Programming 0 December 17th 04 04:41 PM
CheckBox controling a ComboBox Dillonstar Excel Programming 3 October 23rd 03 05:56 PM


All times are GMT +1. The time now is 10:06 PM.

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

About Us

"It's about Microsoft Excel"