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 Chris Miller 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. Stev1parr

    Run-time error "5" on ChDrive (Left(.DefaultFilePath, 1))

    Tried all of the modifications to this one code. All led to the same conclusion. I am thinking that there may be a security iusse. Is this a possibility?
  2. Stev1parr

    Run-time error "5" on ChDrive (Left(.DefaultFilePath, 1))

    Is the "Left" part of the command creating the inconsistency with some PCs? Also, would file extensions matter. For instance, the file that is being opened in the using the code is a .xlsm. Some PCs have no issue and some do.
  3. Stev1parr

    Run-time error "5" on ChDrive (Left(.DefaultFilePath, 1))

    In my initial code example was not complete. below is a much better example that includes ChDrive (Left(.DefaultFilePath, 1)). Private Sub CommandButton119_Click() Dim Filter As String, Title As String Dim File As String Dim FilterIndex As Integer Dim Filename As Variant Dim curWB As Workbook...
  4. Stev1parr

    Run-time error "5" on ChDrive (Left(.DefaultFilePath, 1))

    I have a code that seems to work on some PCs and not on others. All PCs are running 2007. Files can be on PC or network drives. Essentially the code error occurs at ChDrive (Left(.DefaultFilePath, 1)). I step into the code. When I get to ChDrive (Left(.DefaultFilePath, 1)), error on some...
  5. Stev1parr

    Need help with Workbooks.Open Filename

    The code now works after removing the "_". I could use a If statement that identifies if file destWB is already open. If so, "text" alerting to this fact and move one. Currently, Excel its own alert, if selecting the "no", causes a error. Can any assistnce be provided with this?
  6. Stev1parr

    Need help with Workbooks.Open Filename

    When I modify the PasteSpeacial and run the code, From: Destination:= destWB.Worksheets("Resource Sheet").Range("y3:Y68").PasteSpecial xlPasteValues To: destWB.Worksheets("Resource Sheet").Range("y3:Y68").PasteSpecial xlPasteValues I get the follwoing error message "Object doesen't...
  7. Stev1parr

    Need help with Workbooks.Open Filename

    When I modify the PasteSpeacial and run the code, I get the follwoing error message "Object doesen't support this property or method".
  8. Stev1parr

    Need help with Workbooks.Open Filename

    I am at the end of a great code the copies from one file to another. I thought I had everthing done until I saw the need for greater buy in from users. Below is a much shorter version of what I want to do. Everything works until I get to the PasteSpecial line. The curWB has the formula in...
  9. Stev1parr

    Need help with Workbooks.Open Filename

    That did the trick. Thank so much.
  10. Stev1parr

    Need help with Workbooks.Open Filename

    Tried the code below: If destWB.Worksheets("Sheet2") is nothing then msgbox "Sheet2 does not exist"else 'do something with sheet2 end with ______________________ Received a "Subscript out of range" error message. Below is how I am using the If statement: Private Sub...
  11. Stev1parr

    Need help with Workbooks.Open Filename

    I want to validate that "destination:=destWB.Worksheets("Sheet2").Range("E5")" is the correct worksheet. How do I write an if statement to alert that the active workbook.worksheets does not match the destination. ________________________ Below is my attempt: If Destination = False Then...
  12. Stev1parr

    Need Code for Printing Options

    I need assistance with a print code. What I want to select columns and hide those columns. Then file print. When the print dialog box appears, I want to have the option to select From/To and number of copies. Then I need to option to preview or just print. If preview is chosen, I need the...
  13. Stev1parr

    Need help with Workbooks.Open Filename

    Thank you very much. It Worked!!!
  14. Stev1parr

    Need help with Workbooks.Open Filename

    I want to copy from one xls and paste to another xls to another. To get there, I need to identify the two files and sheets. How do I identify the current xls that is open as well as indentfy the xls that I open to paste into? Additionally, how do I ensure the right sheets for both files are...

Part and Inventory Search

Back
Top