Hi,
I have a general question about vba and if this can be resolved I will dig into it, only I want to make sure that this is possible.
I have an excel which has some hyperlinks in the same column on different row. I have to click on each of them then take the info from the webpage which opens...
I need to know which line contains data, because I have to create the following formula:
C100 = Sum(C1:C50)+ .... - where let say that C50 is the last line containing text. I have to calculate the sum of the lines.
But if on the sheet there are inserted new lines, than there will be more than...
Hi,
Is it possible to calculate which is the last line in an excel sheet which contains date, using excel formula? I done this with VB script.
For ex:
A1= 1
A2 = 2
A3 = 4
A4= nothing
A5=6
.... nothing lower ...
And as a result i would need the A5 cells, because that contains the last data...
The "Runner" is defined later in the code.
Maybe if yu saw this you will understand better my code:
Private Sub Command1_Click()
On Error GoTo Handler
Call Hello
End
Handler:
Call Runner.Stop
Call MsgBox(Err.Description + vbCrLf + Err.Source)
End Sub
The error code which i wrote it...
Hello,
I have the following lines in a sample code, which should be correct:
Handler:
Call Runner.Stop
Call MsgBox(Err.Description + vbCrLf + Err.Source)
But i got the following error code:
Object variable or with block variable not set, on the first line (call runner.stop)
I got the same...
Hello,
I have an excel file with 7 sheets. I would like to write a code for creating a sheet at the end of the file (number 8).
I wrote the following:
Dim xlSheet As Excel.Worksheet
Set xlSheet = Worksheets.Add(,"Service")
xlSheet.Name = "My Sheet"
I wrote Service, because the 7th sheet name...
I know that they change location. The problem is that sometimes they are shifted done sometimes not.
The nearby code is:
a = ThisWorkbook.Sheets(sheet).Cells(ii, 1)
b = ThisWorkbook.Sheets(sheet).Cells(ii, 2)
c = ThisWorkbook.Sheets(sheet).Cells(i, 16)
d = ThisWorkbook.Sheets(sheet).Cells(i...
Hello,
I'm using the following code:
ActiveSheet.Rows(ii + 1).EntireRow.Insert
ActiveSheet.Rows(ii + 1).NumberFormat = "@"
**insert some data on the "ii+1" line
and I'm having the following problem:
almost in all of the cases(90%) it works perfectly, but sometimes I saw that the rows aren't...
1) What does your line do?
2) I don't use an installation package, BUT I do have send the client the missing ocx file, what he copied into the correct directory(C:\Windows\System32)
Kenguru
Sberthold,
In the project-references i have Excel 11 object which i had to include, other ways i couldn't work whit the excel object.
You are suggesting to exclude that way i send the project to the client? Will than work for him?
Thank you for your time.
Thanks Bob for the detailed response you gave me.
I rewrote the code in the following way:
Dim xl As Object
Set xl = CreateObject("Excel.Application")
On Error Resume Next
If Is_Open Then Workbooks.Close
dlg.ShowOpen
If Err Then Exit Sub
xl.Workbooks.Open dlg.FileName
Is_Open = True
Set xl =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.