LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Application.vlookup problem

Hello,

I'm having problem running the following piece of code and would
appreciate any help.

Firstly I've created two comboboxes, the result of one populates the
second. I then want to use the application.vlookup to populate textboxes
on my form.

Private Sub CB2_Change()

Dim appexcel as excel.application
Dim choice as string
Dim wks as worksheet
set choice = CB2.text 'this is the name of the sheet.
Set appexcel = Application

textbox1.text = application.vlookup(CB1.text,
wks(choice).range("A1:N200"),3,true) ' this line errors when I debug
and I think,it is to do with the choice variable.

etc

End sub

Hope this makes sense.

Regards

David
 
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
application.worksheetfunction.vlookup JulieD Excel Programming 5 August 12th 04 04:42 PM
Application.OnKey problem R Avery Excel Programming 0 July 8th 04 06:38 PM
Problem with Application.Width Leo Excel Programming 2 February 2nd 04 09:22 PM
Application.OnKey problem Phillip Reeves[_2_] Excel Programming 1 January 23rd 04 06:46 PM
Application Problem Stuart[_10_] Excel Programming 7 November 16th 03 05:44 PM


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