ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combo box (https://www.excelbanter.com/excel-programming/343310-combo-box.html)

quinellus[_4_]

Combo box
 

Hi,

Could someone please tell me why the data from the combo box is no
being added into the path of the file name in the following code?

Private Sub ComboBox1_Change()

Workbooks.Open Filename:="S:\AHCA Report 04-05\Michael\Prior yea
information\6\" & <value from dropdown & ".xls"


End Sub


Regards,

Michae

--
quinellu
-----------------------------------------------------------------------
quinellus's Profile: http://www.excelforum.com/member.php...fo&userid=2819
View this thread: http://www.excelforum.com/showthread.php?threadid=47773


JakeyC

Combo box
 
The code that you have omitted is kind of crucial to see where the
error is!

How you arrive at <value from dropdown is what determines your code's
success.


Dave Peterson

Combo box
 
Private Sub ComboBox1_Change()

Workbooks.Open _
Filename:="S:\AHCA Report 04-05\Michael\Prior year information\6\" _
& combobox1.value & ".xls"

End Sub

What were you using for <value from dropdown?

quinellus wrote:

Hi,

Could someone please tell me why the data from the combo box is not
being added into the path of the file name in the following code?

Private Sub ComboBox1_Change()

Workbooks.Open Filename:="S:\AHCA Report 04-05\Michael\Prior year
information\6\" & <value from dropdown & ".xls"

End Sub

Regards,

Michael

--
quinellus
------------------------------------------------------------------------
quinellus's Profile: http://www.excelforum.com/member.php...o&userid=28198
View this thread: http://www.excelforum.com/showthread...hreadid=477738


--

Dave Peterson

quinellus[_5_]

Combo box
 

Thanks a lot for your help! combobox1.value was what I needed.


--
quinellus
------------------------------------------------------------------------
quinellus's Profile: http://www.excelforum.com/member.php...o&userid=28198
View this thread: http://www.excelforum.com/showthread...hreadid=477738



All times are GMT +1. The time now is 11:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com