473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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
3 1009
jamesd0142
469 256MB
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
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
Killer42
8,435 Expert 8TB
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

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

Similar topics

15
by: Viviana Vc | last post by:
How can I programatically do the equivalent of the following: cacls "C:\Program Files\test" /T /G Everyone:f ? Thanks, Viv
2
by: Brian Bischof | last post by:
I've spent the past three hours struggling with this one and Googled the hell out of it. Please help! I ran IISLockdown for another problem and it trashed IIS. ASP pages wouldn't run at all. So...
5
by: Barry Anderberg | last post by:
I'm using a tool by Sci-Tech called the .NET Memory Profiler. We have a massive .NET/C# application here and it has been exhibiting memory leak behavior for some time. Attempting to remedy the...
5
by: sck10 | last post by:
Hello, I am using the code below to set the values of a DetailsView template field using FindControl. My question is how would you find a control if its a Boundfield control? For example,...
12
by: jelle | last post by:
That's basically the idea... Often i find myself annotating what variables actually stand for, so to refer back to the code in half a year or so. # check if ID's or coords self.pointIDs = ptIDs...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
3
by: antred | last post by:
Hello everyone, While working on a program I encountered a situation where I'd construct a largish data structure (a tree) from parsing a host of files and would end up having to throw away...
6
by: Homer J. Simpson | last post by:
Hi all, I have enough experience with HTML/classic ASP to get by, and I'm trying to learn ASP.NET. Traditionally, I've taken the habit of breaking out extra-long CSS files into multiple,...
3
by: haytham2008 | last post by:
hi every body ? im computer engineering student , im in the 4th year , in the next year i need to make software project to Graduate, i dont know what i will do ? so i think i will find a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.