Search:

Type: Posts; User: MrPumper

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    1,018

    Re: Excel formula in Visual Basic problem

    Thanks .paul.
  2. Replies
    7
    Views
    1,018

    Re: Excel formula in Visual Basic problem

    I believe I have it thanks to paul from an earlier post of mine.
    Not sure what the $ and {} do. but it gives me the correct answer.


    oSheet.Range($"G{m}") = $"= G4 - G{n}"
  3. Replies
    7
    Views
    1,018

    Excel formula in Visual Basic problem

    I have been using this formula


    oSheet.Range("G" & m) = "=G" & n & " - G4"

    It works, but now I want to change the order and subtract the variable cell from a static cell.
    This is what I tried...
  4. Re: Using Excel SUM formula problem

    Thanks OptionBase1, I have tried every combination except this one. It works as I wanted.
    Looking back it was very simple.
  5. [RESOLVED] Using Excel SUM formula problem

    The first 2 lines of code works, the last 2 lines with the variable n does not.
    LOoking for help on using the SUM formula.
    The Form1.lblRecords.Text gets no higher than 50




    Dim m As String...
  6. Re: Saving file to the DeskTop problem

    Yes jmcilhinney I agree that is what I am doing.
  7. Re: Saving file to the DeskTop problem

    Thanks sapator that also works, here is my code


    oBook.SaveAs(My.Computer.FileSystem.SpecialDirectories.Desktop + "\Handicaps.xlsx")


    Thanks for your help
  8. Re: Saving file to the DeskTop problem

    I think I found my answer.

    oBook.SaveAs(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + "\Handicaps.xlsx")
  9. [RESOLVED] Saving file to the DeskTop problem

    Visual Basic Net 2017 I have this file location code.




    oBook.SaveAs("C:\users\pisto\OneDrive\Desktop\Handicaps.xlsx")



    This is OK for the computer I wrote this for but on another...
  10. Replies
    57
    Views
    6,801

    Re: Learning Visual Basic Net

    Thanks for all those kind words, I appreciate it.

    I am not new to programming I find anything written by Microsoft is difficult to understand.
    My first programming experience was in the 1980's...
  11. Replies
    57
    Views
    6,801

    Re: Learning Visual Basic Net

    All I did was ask a simple question!
  12. Replies
    57
    Views
    6,801

    Re: Learning Visual Basic Net

    I do have some history in programming. I started when Basic was just Basic, Microsoft first Visual Basic, VB6, VB Net.
    I only program occasionally for something to do, not as a profession. My...
  13. Replies
    57
    Views
    6,801

    Re: Learning Visual Basic Net

    Thanks that's a good explanation. You probably get my question over and over again.
    I think then my best bet is to look to the forum for some answers then make my own notes for what I am doing,...
  14. Replies
    57
    Views
    6,801

    Learning Visual Basic Net

    I have seen words like these:
    Enumerable.Range
    IEnumerable(Of String) In lines.Split(84).ToArray()
    <Runtime.CompilerServices.Extension>
    Environment.NewLine
    String.Join

    I have bought books...
  15. Re: Help creating a CSV file from a text file

    Thank you all, I now have my solution
  16. Re: Help creating a CSV file from a text file

    Yes, I have an extra line.
    I added this if
    If (RALN = np - 1) Then Exit For that takes care of it for now but I will need to fix it properly.



    For RALN = 0 To (np - 1) Step 84 'ADDING 84...
  17. Re: Help creating a CSV file from a text file

    The exception was thrown on this line:


    StringLine &= PlayerArray(RALN + pa)


    The bounds of the array is 0 to 3108
    I am new at this I don't know what a System Index is, that's one of the...
  18. [RESOLVED] Help creating a CSV file from a text file

    I load the text file into an array then create the CSV file.
    Run the program but it throws an Exception "SystemIndexOutOfRange: Exception unhandled Index was outside the bounds of the array"...
  19. Replies
    9
    Views
    1,069

    VS 2019 Re: Visible Message while Code Runs

    WOW I completely missed what JMC suggested it did the trick. I can't thank all of you enough for staying with me.
    Now I will study it further to understand what it is doing.
    Thank You
  20. Replies
    9
    Views
    1,069

    VS 2019 Re: Visible Message while Code Runs

    Shaggy Hiker

    You are correct, after commenting out it was fast.
    What is your suggestion?
  21. Replies
    9
    Views
    1,069

    VS 2019 Re: Visible Message while Code Runs

    I forgot to describe the CSV file size so here it is.
    The CSV file has 36 lines with 44 fields in each line
  22. Replies
    9
    Views
    1,069

    VS 2019 Re: Visible Message while Code Runs

    jmcilhinney
    The part of my code that is slow, is when I covert a CSV file to a Sequential file.
    Here it is.


    Using MyReader As New...
  23. Replies
    9
    Views
    1,069

    VS 2019 Visible Message while Code Runs

    Project uses Windows Forms and part of the code takes about 7 seconds to complete, that is a long time for a user to wait.
    Is there a way to have a message stay on while the code runs then...
  24. VS 2019 Re: Calling a *.exe program from a different directory than the calling program

    I have been trying all your suggestions but so far have not gotten it to work probably because I am not sure of how to use it but I am and will keep trying.
    I have been looking up how to use...
  25. VS 2019 Re: Calling a *.exe program from a different directory than the calling program

    I am now using this:


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSortHandicaps.Click
    Dim procID As Integer
    procID =...
  26. VS 2019 Calling a *.exe program from a different directory than the calling program

    Here is what I have used and it works.


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSortHandicaps.Click
    Shell(My.Application.Info.DirectoryPath +...
  27. Replies
    5
    Views
    1,047

    VS 2019 Re: Number of lines in a sequential file

    Great, I am using that now. Thank You
  28. Replies
    5
    Views
    1,047

    VS 2019 Re: Number of lines in a sequential file

    That's what I was looking for, Thank You.
  29. Replies
    5
    Views
    1,047

    VS 2019 Number of lines in a sequential file

    How do I know how many lines are in a sequential text file?
    Or how to read the file one line at a time so I can count the lines in the read.
  30. VS 2019 Re: Replacing 1st field of each line in a csv file

    I am a part time programmer for personal fun. I would never gotten it.
    I still don't understand what it does but will be studying it to see if I can understand each line.

    Thanks .Paul for your...
  31. VS 2019 Replacing 1st field of each line in a csv file

    I need to change the first field of each line of a CSV file.
    I have searched a lot of info but can't out it together so I have no code to show.

    Here is the CSV file it's name is scores2.csv.

    ...
  32. Replies
    15
    Views
    2,287

    VS 2019 Re: Printing form on 8 1/2 x 11 paper

    Because the Form is set in size and will always be printed on Landscape 11 x 8 1/2 and maybe someone else can use the code.
    I have shortened the code to this:


    Private Sub...
  33. Replies
    15
    Views
    2,287

    VS 2019 Re: Printing form on 8 1/2 x 11 paper

    Thank you paul, I am getting closer to understanding it.
    Early in the code the physical printed page was set to 1100 x 850 (8 1/2 x 11 landscape) and the form was larger than that
    so the If...
  34. Replies
    15
    Views
    2,287

    VS 2019 Re: Printing form on 8 1/2 x 11 paper

    After using msgbox I find that e.MarginBounds refers to the bmp rectangle that fits on the paper size not the actual form size. I guess that's what paul was trying to tell me.

    Where did that get...
  35. Replies
    15
    Views
    2,287

    VS 2019 Re: Printing form on 8 1/2 x 11 paper

    Thanks to your help I have seen that things like like MarginBounds.Top or Left or Right etc is nothing more than a default of 100,
    and that it refers to a rectangle(I had already concluded) that...
  36. Replies
    15
    Views
    2,287

    VS 2019 Re: Printing form on 8 1/2 x 11 paper

    paul, what you are saying is e.MarginsBounds.Width and e.MarginsBounds.Height is the size of the paper I am printing on.
    Then what is e.MarginsBounds.Top? I mean how was it calculated? There is...
  37. Replies
    15
    Views
    2,287

    VS 2019 Printing form on 8 1/2 x 11 paper

    I found this code somewhere in my google search and it works very nicely.


    Private Sub btnPrintForm_Click(sender As Object, e As EventArgs) Handles btnPrintForm.Click
    'Print Form Fit to...
  38. Re: Visual Basic net files tutorial

    Thanks paul, this is what I am looking for. There is enough info here to keep me busy for a long time trying to absorb it all so I can pick the right process for my programs.

    I am sure I will...
  39. [RESOLVED] Visual Basic net files tutorial

    There appears to be many different ways to deal with reading, writing, checking if a file exist etc.
    Is there a good tutorial that deals with all of those ways?
  40. Re: Visual Basic NET 5.0 Compile to standalone folder

    I found my own answer. https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file
    Near the bottom "Publish a single file app - Visual Studio"
Results 1 to 40 of 62
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width