By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

have no idea how to and its imperitive i find out....please help

P: 1
i am slightly new to VB, and I am currently working on a project for work where i need to get it to copy 3 lines of information from one excel sheet and paste it onto another and then skip 2 lines and do it again... i have been trying for almost 2 weeks to figure it out but i guess i am just too new at this to get it to work... please help i just need to know how to tell it to copy 3 lines and then how to skip 2 before it does it again... thanks!
Jan 29 '08 #1
Share this Question
Share on Google+
3 Replies


jamesd0142
100+
P: 469
i am slightly new to VB, and I am currently working on a project for work where i need to get it to copy 3 lines of information from one excel sheet and paste it onto another and then skip 2 lines and do it again... i have been trying for almost 2 weeks to figure it out but i guess i am just too new at this to get it to work... please help i just need to know how to tell it to copy 3 lines and then how to skip 2 before it does it again... thanks!

heres how to write to a file
Expand|Select|Wrap|Line Numbers
  1. Private Sub WriteFile()
  2.         'can use .append instead of .output
  3.         Dim Date1 As String = Format$(Now)
  4.         Dim Date2 As String = Mid(Date1, 1, 10)
  5.         FileOpen(1, "C:\text123412.txt", OpenMode.Output)
  6.         Print(1, Date2) ', Environment.NewLine)
  7.         FileClose(1)
  8.     End Sub
  9.  
to goto next line use:
Expand|Select|Wrap|Line Numbers
  1. "string" & vbcrlf & "string"
  2.  
which would look like:

string

String
Jan 29 '08 #2

P: 58
How far along are you? What are you stuck on?
Have you got/set an object reference to an Excel application?
Do you know the name of both workbooks?
Do you know the worksheet names?
Do you know the location (range) in the first worksheet that is to be copied.
Do you know the range in the second worksheet where the data is to go?


i am slightly new to VB, and I am currently working on a project for work where i need to get it to copy 3 lines of information from one excel sheet and paste it onto another and then skip 2 lines and do it again... i have been trying for almost 2 weeks to figure it out but i guess i am just too new at this to get it to work... please help i just need to know how to tell it to copy 3 lines and then how to skip 2 before it does it again... thanks!
Jan 30 '08 #3

Expert 5K+
P: 8,434
I think the quickest and surest way for us to help would be if you show us what you have written so far.
Jan 30 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.