Posts by skamat

    Re: Combobox List


    Sir I am aware of that but I was looking for some command in VBA, for eg. I do not know if it works or not


    combobox1.value and combobox2.value = "Pencil"


    like that or some sort of it

    I have 2 combobox in userform
    Both the comboboxes have the same list down value and I have applied as follows



    Code
    combobox1.value = "Transport"
    combobox1.value = "Paper"
    combobox1.value = "Pencil"



    Like this I have long list


    In the combobox2 same list has been applied



    Is there a way in which by one command the list is applicable to both the comboboxes, that would save me on the length of VBA

    Dear Sir
    Please see the attached sheet in which I have written the text "YOU ARE IN THE MONTH OF"


    Now I have already created a combobox (shown in this example sheet) in which all the months are mentioned from January to December.


    Now when I click on any month and click GO I want the month to be shown in Sheet1, after the text YOU ARE IN THE MONTH OF


    That means when January is selected then it should display YOU ARE IN THE MONTH OF JANUARY.
    Then same for all months when selected

    Re: Message Box if Text Box is Blank


    Sir there is still an error
    For Eg. If you enter only Particulars then instead of showing Enter Part Number and Vendor details it shows only Enter Vendor Details
    If you enter only Vendor details , no message box pops out for Part Number and Particulars
    If you enter Part Number and Vendor, no message pops out for Particulars
    If you ente spaces then also no message pops out, as required spaces not allowed for 1st text box. Spaces allowed only for 2nd and 3rd and that also between 2 words

    Re: Message Box if Text Box is Blank


    Sir Works very well, but what I require as I had mentioned above is that I would also like spaces to be counted as blank entry in the text box. If there are spaces in 1st text box at start or in between then also it should give a message box.


    Only spaces in between 2 words can be allowed in a text box, but that also in 2nd and 3rd text box and not the first one. (First Text Box no spaces are allowed)


    Secondly all the blank entry should be mentioned in one message box only. In this case if all three text boxes are empty the message box pops up 3 times.
    What I mean to say that if all three text boxes are empty then message box should say "Please Enter Part Number, Particulars, Vendor Name", like what I have already posted above.


    Same way for 2 empty text, then only the name of 2 empty text box should appear and for 1 text empty text box one name should appear.

    Hi, I have created the following User Form


    I now would like to create a VBA code in such a way that if any of the Text Box is blank a message box would be displayed mentioning that the particular text box cannot be blank, and upon clicking the OK button in the message box it should again return to the same user form.


    For Eg. if all 3 text box are blank then message box should say "Please Enter Part Number, Particulars, Vendor Name"


    If 2 Text Box are Blank then it would mention the names of the blank text box, same way for one text box being blank.


    I would also like spaces to be counted as blank entry in the text box. Only spaces in between 2 words can be allowed in a text box, but that also in 2nd and 3rd text box and not the first one. (First Text Box no spaces are allowed)
    I have attached the userform for reference

    Re: VBA to set dynamic formula


    Dear Sir


    Not working perfectly fine.
    Below is the full VBA that I have written



    I had requested for a formula earlier for which I got the perfect reply and the solution worked very well.


    Now I seek further assistance for VBA. The formula I have entered in VBA is as follows


    "=SUMPRODUCT(--(data!R5C1:R100C1=RC3)*--(MONTH(data!R5C2:R100C2)=MONTH(R5C)))"


    Now the thing is that it will search only till line 100.
    I want it to search till the end of the line, for eg. if the data is till 50 then it should search till 50, if the data is till 500 then it should search till 500.


    Again I repeat the above formula is to be used in VBA.