+ Reply to Thread
Results 1 to 14 of 14

Read .csv data without opening in excel

  1. #1
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Read .csv data without opening in excel

    Hi,

    I am looking for help in doing the below things

    If ap.csv has Positive Netqty then InputBox
    In InputBox Stock Name will be there & That InputBox will only be closed by putting paasword

    & Code will not Open Ap.csv in Excel
    ap.csv will not be opened in excel

    so plz help me in solving this problem

    in the below file Vedl has positive netqty So inputbox will come & in that inputbox Vedl name will be there

    Thnx For the Help
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Read .csv data without opening in excel

    try
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Jindon Sir plz Hardcode the path in the code
    Please Login or Register  to view this content.
    i will not select the file, it will be already present the above path
    & Instead of msgbox I need a inputbox like below inputbox

    Please Login or Register  to view this content.
    Last edited by Leonardo1234; 01-30-2023 at 06:30 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Read .csv data without opening in excel

    Replace this:
    Please Login or Register  to view this content.
    With this:
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Read .csv data without opening in excel

    Quote Originally Posted by Leonardo1234 View Post
    Jindon Sir plz Hardcode the path in the code
    C:\Users\WolfieeeStyle\Desktop\ap.csv
    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Quote Originally Posted by Leonardo1234 View Post
    Instead of msgbox I need a inputbox like below inputbox

    Pass = InputBox(" < Result > " & vbLf & x(0, i) & " : " & x(1, i)

    Do While UCase(Pass) <> UCase("U")
    Pass = InputBox(" < Result > " & vbLf & x(0, i) & " : " & x(1, i)
    Loop
    No idea about what you are trying to say.

  6. #6
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Thnx Tms Sir Path Problem is Solved
    ut Msgbox Problem is there ,I need inputbox Only If It has positive Netqty
    Suppose It doesn't has positive Netqty then no inputbox,no msgbox

  7. #7
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Jindon Sir If It has positive Netqty then the code create msg box But i need inputbox
    And if It doesn't has positive Netqty then the code Create a msgbox But i dont need msgbox & inputbox when It doesn't has positive Netqty

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Read .csv data without opening in excel

    @Leonardo1234

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Read .csv data without opening in excel

    Still no idea.
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Please Login or Register  to view this content.
    Thnx Alot Jindon Sir
    Have a Lovely Day Sir
    Problem Solved

  11. #11
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Hi I am having problem in the below lines , Getting runtime error 70 ,permission denied
    Error Highlighted line-
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: Read .csv data without opening in excel

    you need to close both recordset and connection objects before Kill statement.

  13. #13
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    I putted
    Please Login or Register  to view this content.
    Code ran perfectly

    But I haven't closed rs.close
    Will it be fine if I don't put rs.close ?

    & When I put rs.close I got error runtime error 3704 operation is not allowed when object is closed

  14. #14
    Forum Contributor
    Join Date
    07-28-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    173

    Re: Read .csv data without opening in excel

    Got it
    Please Login or Register  to view this content.

    Thnx Alot Jindon Sir For giving ur Precious Time
    Have a Great Day

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. read and get data from another workbook without opening
    By littleangel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2022, 05:13 AM
  2. [SOLVED] When opening more than one excel file, the userform does not read the data from the main
    By saftawy1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2021, 01:10 PM
  3. Shared excel opening as read only
    By musclecarlover07 in forum Excel General
    Replies: 1
    Last Post: 01-16-2014, 03:19 PM
  4. Excel sheet opening as read only in 2010
    By Jassythedog in forum Excel General
    Replies: 2
    Last Post: 03-23-2013, 04:34 PM
  5. Excel opening in Read/Write while in use
    By allg in forum Excel General
    Replies: 10
    Last Post: 03-15-2013, 08:32 PM
  6. Excel opening in read-only mode only.
    By raj_rowdy in forum Excel General
    Replies: 4
    Last Post: 03-12-2007, 07:14 AM
  7. Why are my emailed excel files opening in Read only?
    By Paul Huhn in forum Excel General
    Replies: 0
    Last Post: 03-09-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1