Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Moreco

    Set a combobox as a variable (excel, vba)

    Thank you Skip, but the real problem is when you are doing a Select Case to enter the data on the spreadsheet, for example: Set r = Worksheets("Trials").Range("B2").CurrentRegion ioffset = Sheet3.Range("A54") ioffset = ioffset + 1 Sheet3.Range("A54") = ioffset...
  2. Moreco

    Set a combobox as a variable (excel, vba)

    Hi Skip, So are you saying that I can have my procedure called cmbLCategX_Change() without having a physical combobox called cmbLCategX? Thanks
  3. Moreco

    Set a combobox as a variable (excel, vba)

    Hi guys, I am not sure if this is possible, but I wanted to give it a try. I am working with userforms on excel. One of the userform is called "frmTrials" and on it I have a ComboBox1 that the user may choose from 1 to 3. Based on that decision a second userform is openned called "frmComp"...
  4. Moreco

    Extract the filename from the path using Excel VBA

    Thank you all so much!!!! Mission accomplished!
  5. Moreco

    Extract the filename from the path using Excel VBA

    Hi, I would like to extract the filename from the path using excel vba. As I open my file I store its name on a variable calle FileVar. I did some research and found an example of deleting the filename from the path using: Directory = Left(VarFile, InStrRev(VarFile, "\")). I am not sure how...
  6. Moreco

    Upload/Link a text file to a cell using Excel VBA

    I was able to attach the files in a way that they don't get placed on top of each other, here is what I did. I hope this can help someone else: Private Sub cmdPhoto_Click() Dim VarFile As Variant, Ans As Variant Dim col As Variant col = 3 Sheet3.Cells(1, col).Select...
  7. Moreco

    Upload/Link a text file to a cell using Excel VBA

    Electricpete, Thank you for your help. Skip, I am still having some issues. Here is my complete code: Private Sub cmdPhoto_Click() Dim VarFile As Variant, Ans As Variant Dim shp As Shape, i As Integer VarFile = Application.GetOpenFilename("All Files (*.*), *.*") If VarFile <>...
  8. Moreco

    Upload/Link a text file to a cell using Excel VBA

    Hi, The code above works beautifuly, but if you add more than one picture file, for example, the files get placed on top of each other. Is it possible to assign a specific location for the files? If not, how can I make such that the files don't get placed on top of each other. The other major...
  9. Moreco

    How to close a form(using the top right X) without entering the data

    Skip, Thank you so much but I could not make it to work using the Terminate event. I was able to make it working using the following code: Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If CloseMode = vbFormControlMenu Then Cancel = True Me.Hide...
  10. Moreco

    How to close a form(using the top right X) without entering the data

    Skip, I am sorry, I am working with Excel 2007 using VBA and userforms. Thanks
  11. Moreco

    How to close a form(using the top right X) without entering the data

    Hi everyone, I am not even sure how to explain what I need. I have 6 forms that are linked to a general form called frmDevices. Here is just a portion of the coding for the dependent userform (frmDevices) where each Case is for a different form: Private Sub cmbDevice_Change() Dim r As Range...
  12. Moreco

    Upload/Link a text file to a cell using Excel VBA

    Skip, Thank you so much, this is a lot better than what I had before! You are always giving great answers! You are the best!!!! Thank you so much! Moreco
  13. Moreco

    Upload/Link a text file to a cell using Excel VBA

    PH, Thank you so much. My error was that I was not writing the extension of the file. You were extremely helpful! Thanks Moreco
  14. Moreco

    Upload/Link a text file to a cell using Excel VBA

    PH, I have tried that before and it doesn't work either. Does it work for you if you run my code? Thanks Moreco
  15. Moreco

    Upload/Link a text file to a cell using Excel VBA

    Hi PH, I am new to programming, so thanks for the hint above. I did what you suggested, but now I am getting an error that says: "Cannot insert object". Can you please help me? Here is my code: [Private Sub cmdAddFile_Click() Dim VarFile As String VarFile = InputBox("Enter the destination...
  16. Moreco

    Upload/Link a text file to a cell using Excel VBA

    Hi everyone, I have a big project using user-forms in Excel and one of the task is to allow the user to attach different types of files such as text and picture to a cell pre-destinated by my VBA code, so that it can be downloaded by a different user/tech. I am not sure if this can be done...
  17. Moreco

    Add a string to a range and write it to a text file using VBA

    Thank you so much for all your help. I was able to accomplish my task.
  18. Moreco

    Add a string to a range and write it to a text file using VBA

    I have a text file that has 65 columns and 1836 rows. I need to: * Open the text file for the given path * Create a vba code in excel that writes a string before each cell; (Example: "Insert into channel_data ("here have the cell information")" * Place the entire workbook with the added...

Part and Inventory Search

Back
Top