|
Just wanted to say thanks to everybody who gave input.
ciao.
Dazz
|
|
|
|
|
Hi
I have a VBA application that reads from a config file on a network drive. It does this fine.
However when I use the File System Object to look for directories below the network path eg:
FSO.FolderExists(path) where path is \\DansComputer
It returns false.
Does this function work accross a network and if so what am I doing wrong. (It has worked fine locally).
Thanks
Dan
|
|
|
|
|
\\DansComputer is the machine name not a folder name
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thanks for your reply - how do i get it to look at a seperate machine then?
I had assumed it would just see something like \\DansMachine\Work as a folder.
Thanks
Dan
|
|
|
|
|
You have to supply the complete UNC name to the root of a file share at least:
\\servername\sharename\
or somehwere below that:
\\servername\sharename\folder\folder\...
|
|
|
|
|
You first need to share the folder that you wish to access on DansMachine for example give the folder a name like DansSharedFolder then your path variable value should be something like \\DansMachine\DansSharedFolder
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
It looks like we've got a couple of "UniVoters" running around today...
|
|
|
|
|
What's a UniVoter?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Kind of like the "UniBomber". Shows up at random, voting posts a 1 that really don't deserve it.
|
|
|
|
|
Thanks that solves it.
Dan
|
|
|
|
|
how can i clear all the data that appear on the datagride object in order to get another answer to my condition ???
plz any one can help me fastly??
|
|
|
|
|
datagrid or datagridview ?
if datagridview then use following statement to clear all Rows
DataGridView1.rows.clear
and use following statement to clear all Columns
DataGridView1.columns.clear
i have no idea about datagrid
Hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
thanks u very much it worked
but when i want to get my new answer in the datagrideview it doesn't appear in it
tell me if there is any other soulution
thanks very much
|
|
|
|
|
but when i want to get my new answer in the datagrideview it doesn't appear in it
tell me if there is any other soulution
????
please explain in more simple way. What do you want to know ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Can anyone explain me how to use VSprinter in vb 6.0.
Actully i am not getting correct output as i want i am sending you the code pls go through it and tell me wt is wrong in this code.
Dim maindata As ADODB.Recordset
Public db As New ADODB.Connection
Dim connstring As String
Private Sub Form_Load()
connstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sqlserver;Password=sqlserver;Initial Catalog=master;Data Source=."
db.ConnectionString = connstring
db.Open
Set maindata = New ADODB.Recordset
maindata.CursorLocation = adUseClient
maindata.CursorType = adOpenDynamic
maindata.Open "select * from login", db, adOpenDynamic, adLockPessimistic
vp.Orientation = orLandscape
vp.PaperSize = pprA4
vp.FontName = "Courier New"
vp.MarginTop = "0.5 in"
vp.MarginBottom = "0.5 in"
vp.MarginHeader = "0.5 in"
vp.MarginLeft = "0.5 in"
vp.MarginRight = "0.5 IN"
vp.ExportFormat = vpxRTF
vp.ExportFile = App.Path + "\tempph.rtf"
vp.StartDoc
vp.Zoom = 100
Header
vp.FontSize = 11
Dim PendingQty As Double
Dim DespQty As Double
Dim totPending As Double
totPending = 0
Do While Not maindata.EOF
' vp.AddTable FormatStr, HeaderStr, maindata!dono & vbCrLf & maindata!dodate & "|" & maindata!CustName & vbCrLf & maindata!IName & "|" & maindata!dcity & vbCrLf & maindata!despdate & "|" & maindata!Unit & "|" & Format(maindata!Qty, "0.000") & "|" & Format(DespQty, "0.000") & "|" & Format(PendingQty, "0.000"), , , True
vp.AddTable formatstr, headerstr, maindata!id & vbCrLf & maindata!Name & "|" & maindata!address & vbCrLf & maindata!phone & "|" & maindata!fax & vbCrLf & maindata!email & "|" & maindata!id & "|" & Format(maindata!id, "0.000") & "|" & Format(id, "0.000") & "|" & Format(id, "0.000"), , , True
'vp.AddTable FormatStr, HeaderStr, maindata!id & maindata!Name & maindata!phone & maindata!address & email, , , True
' vp.AddTable formatstr, headerstr, maindata!phone & "|" & maindata!Name & "|" & maindata!fax, , , True
'vp.Paragraph = FormatS(maindata!Dono, 12) + " | " + FormatS(Left(maindata!custname, 30), 30) + " | " + FormatS(maindata!dcity, 13) + " | " + FormatS(maindata!unit, 6) + " | " + FormatN(maindata!qty, "#######0.000") + " | " + FormatN(DespQty, "######0.000") + " | " + FormatN(PendingQty, "####0.000")
'vp.Paragraph = FormatS(maindata!dodate, 12) + " | " + FormatS(Left(maindata!IName, 30), 30) + " | " + FormatS(" ", 13) + " | " + FormatS(" ", 6) + " | " + (" ") + " | " + (" ") + " | " + (" ")
'vp.Paragraph = FormatS(" ", 12) + " | " + FormatS(" ", 30) + " | " + FormatS(" ", 13) + " | " + FormatS(" ", 6) + " | " + (" ") + " | " + (" ") + " | " + (" ")
'totPending = totPending + PendingQty
If vp.CurrentY > vp.PageHeight - vp.MarginBottom - vp.MarginTop Then
'vp.Paragraph = String(100, "-") + " Continue........"
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.NewPage
Header
End If
maindata.MoveNext
Loop
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.FontBold = True
vp.AddTable formatstr, headerstr, "||||| Total |", , , True
vp.FontBold = False
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
'vp.Paragraph = String(112, "-")
'vp.FontBold = True
'vp.Paragraph = FormatS(" ", 25) + " " + FormatS(" ", 30) + " " + FormatS(" ", 6) + " " + " " + " " + " Total : " + " | " + FormatN(totPending, "####0.000")
'vp.FontBold = False
'vp.Paragraph = String(112, "-")
vp.EndDoc
'cmdExport.Enabled = True
End Sub
Private Sub Header()
vp.FontName = "Arial"
vp.TextAlign = taLeftTop
vp.FontBold = True
vp.FontSize = 20
vp.Paragraph = "Ashapura Volclay Ltd."
vp.FontSize = 14
vp.FontBold = False
vp.Paragraph = "Pending Delivery Report"
vp.FontSize = 12
'vp.Paragraph = "From : " + FormatS(TSDATE, 11) + "To : " + FormatS(TEDATE, 11)
vp.Paragraph = "From : To : "
vp.TextAlign = taLeftTop
vp.TextAlign = taRightTop
vp.Paragraph = "Page No : " & vp.CurrentPage
vp.TextAlign = taLeftTop
vp.FontSize = 10
vp.TableBorder = tbNone
formatstr = "1500|>1600|>1600|>1600|>1600|>1600"
headerstr = "Do No " & vbCrLf & "Do Date|Customer Name " & vbCrLf & "Grade|Despatch City " & vbCrLf & "Despatch Date|Unit|Ord.Qty|Desp.Qty|Pending Qty"
'headerstr = "ID|Name|Phone|Address|Fax|Email"
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.FontBold = True
vp.AddTable formatstr, headerstr, "||||||||", , , False
vp.FontBold = False
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
'vp.Paragraph = "DO No " + " | " + "Customer Name " + " | " + "Despatch " + " | " + "Unit " + " | " + " Ord.Qty." + " | " + " Desp.Qty" + " | " + "Pending Qty."
' vp.Paragraph = "DO Date " + " | " + "Grade " + " | " + "City " + " | " + " " + " | " + " " + " | " + " " + " | "
'vp.FontBold = False
'vp.Paragraph = String(112, "-")
End Sub
GIRISH
|
|
|
|
|
How to write code for each button.click to open different picture (from server) into image "box" ?
|
|
|
|
|
That depeds on the type of server you're getting this image from and how you're displaying this image.
|
|
|
|
|
How to create Typed dataset through code.
|
|
|
|
|
in one component i want to place one button and combobox .how can i do that?..........i don't want to do as a usercontrol...is their any way to do like this?............
Pls help me.it's very urgent................
|
|
|
|
|
are you working with WebForm or WinForm ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
i have the soluotion for the web case
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
If you want a control that 'contains' other controls, then you want a usercontrol. Why don't you want to do this?
|
|
|
|
|
anujose wrote: i don't want to do as a usercontrol...
You have two choices. Either inheriting from UserControl or write the entire thing from scratch, inheriting from Control.
|
|
|
|
|
Hello,
I am trying to write a strongly typed object class
(so I can bind the properties of the class object to form controls) along the lines of:
Public Class foo
Private _myCol As Collection
Public Property Name() As String
Get
Return _myCol("Name")
End Get
Set(ByVal value As String)
_myCol.Remove("Name")
_myCol.Add(value, "Name")
End Set
End Property
Public Property Title() As String
Get
Return _myCol("Title")
End Get
Set(ByVal value As String)
_myCol.Remove("Title")
_myCol.Add(value, "Title")
End Set
End Property
End Class
This is quite simply awful. If I use an array instead of a collection I can get rid of the
collection remove and add rubbish.
In effect I could replace
Return _myCol("Title")
with
Return _myArray(1)
This means that I have to relate each property to an index (Name to 1 and Title to 2 for example)
and it means that when I create the class I have to manually type this relationship in.
The real problem with this is that I anticpate having lots of classes like this each with lots
of properties and frankly I am a bit lazy and dont want to physically key them in like this.
One option was to bind the controls to an exposed dataset in my foo class instead but I dont
want to do that. I want to expose Foo.Name and Foo.Title etc.
There must be an easier way than that above - any ideas?? (either a template based way of entering
them into visual studio or a completly new way of coding them)
thanks in advance
Martin
-- modified at 5:25 Wednesday 27th June, 2007
life is a bowl of cherries
go on take a byte
|
|
|
|