Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Naming DLLs


This is a silly question, but how can I put spaces in the name of DLLs? When I add references, all of the preexisting ones have spaces, but VB gives me an 'Invalid Name' error when I try to put spaces in the name when creating the DLL.

Thanks in advance.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Difference In Types Of DLLs (VB AX DLLs Vs. C++/Win DLLs)
Can anyone explain the difference between the AX DLLs that you might create in VB vs. the DLL libraries that you reference in API calls with Declare Function?

*** Note: I also posted this Q in the COM/AX forum ***

Getting API Calls From DLLs That Arn't Win32API Dlls..
Is there a way to get API calls from other DLL that arn't Win32API calls?

For example,
If I want to use a WinZip dll, how can I get the functions that are inside the DLL?

Please help,
Thanks,
Nahum.

Dlls And ActiveX Dlls
Hi,

Can anyone of yu ******** me the diff between these 2 terms?

Tab Naming
I am making a options form and i have 4 tabs. how to i set captions for each one? also how do i have each tab have different info and options to choose from.

thanks
turtleman14789

Naming Ranges
Hi all,

I am trying to create range names for a large number of ranges, in order to do so I am using the createnames function and pulling the name from the row to the left. That is all working fine but I am trying to also add a suffix to the range name (i.e. _MTD). Below is my code along with the results and desired results, I have been unable to get it to work so any help would be appreciated.
Kevin

Sub Range_Name()
Set rangetoName = Worksheets("Queries").Range("A26:B37")
rangetoName.CreateNames Left:=True
End Sub

Result: Other_Income
Desired Result: Other_Income_Mtd

Naming A Chart In VB
Apologies if this has been asked already.

I'm having trouble naming a chart through vb

I use the following code:


Code:
ActiveChart.name = "Cluster Graph"

But then get the message:

Method 'Name' of object '_Chart' failed.

Any suggestions?

Naming A File
ey guys this is probably a noob question XD

i have the following code:


Code:
Private Sub Command1_Click()
file = InputBox("The File name please")

Open "c:file.txt" For Output As #1

Print #1, Text1.Text

Close #1
End Sub

i want to name the file but it does not work, what am i doing wrong here?

Naming Question
Is it any diffren't when you are using "هنِ" in variable names, functions, subs etc. no minor slowdown? all system's can execute the *.exe?

Naming Conventions
What naming conventions do you think is most standard (that most percentage people use). Because I go through the DirectX objects and finding out their naming conventions for subs/functions and variables but some variables begin with a lower letter (h for handle) but most do not. Some variables are in all lower case and some have a mixture of both (even in the same object).

So:
1) When would you use Hungarian Notation (I think?) for a variable...
2) When would you use all lower case
3) When would you use both cases
4) When would you use underscores
5) When would you cut off names ('Rect' from Rectangle)

If you say "It's all up to you", then at least tell me what you do in particular.

SourceSafe Uses 8.3 Naming?
Here is my issue, I am trying to setup a SourceSafe server on a machine with a computer name of "MyServer12345" now source safe does not like this for a DB location.. it keeps giving me error messages about not being able to find the path, or that the DB is an incorrect DOS name. (It is using unc like this: \MyServer12345VSS) Now if i do an identical setup on server "MyServer" I have no issues.

Does sourcesafe require database paths to conform to DOS 8.3 naming? And why is it using UNC for the path on mapped drives??

Naming Gathering
Not sure if this is possible or not, but is there a way (beside writing it out) to get all the names for objects in a project? i.e. if I have a project that has two command button called command1 and command2, that I can get a txt created that list the name of those buttons?

Naming Lines..
Anyone, in VB, know how to name something u drew...For example..I have an application that draws a line on the form..Is there anyway to give a name to that form so it can have properties like .X1,.X2, ect..so i can manipulate it later?

Naming Project Help
im trying to make a program that will prompt the user for their first, middle, and last name. show all 3 names in seperate labels, their initials in big letters with periods after each letter. a "personal color" based on the numerical value of their three initials. also display a hybrid of their first and last name. this should be the first half of their first name and the second half of their last name. for example bob bob..would be boob

Naming A Class
Hi :
i wanted to create a class called " Administrator"
but if i save it as a cls file, VB 6 says that it is not a legal object name.

SO i am just wondering if there is like any naming conflict. can someone explain??


thanks..

VB Naming Conventions
Hi all,

I am currently designing a small application that will plugin into another larger application. I have designed and tested my small application on my own form using visual basic 6.0 pro, it works successfully. I have attached my small application to my larger application but now it does not work. I believe because the names of the text boxes in the larger application are not what i thought they where. Is there a way of finding what the names of all the text boxes and drop down lists in the larger application are? The larger application was not designed by this company and we do not have the code for it. Any suggestions on how i can over come this hurdle would be of a great help.

Thank you for your time...

Regards,

nsp

Variable Naming
This is probably impossible, but can i take some text from a textbox and make that a variable name? Lets say the user types in Keyboard, can I dim a variable with the name Keyboard?

Something along the lines of dim text1.text as string, but obviously not so simple (or maybe exactly that simple.... )

Caption Naming
Is it possible to permanently name a check box caption on one form from an input created in another form? When I try to do this it only accepts the change whilst the form is open but reverts to the original caption when closed.

Proper Naming In Vb
what are the different proper names in vb like for example

"" = vbnullstring
1 = vbchecked (for checkbox)
0 = vbunchecked

trim$ <- dollar sign
mid$
left$
right$

my question is where can i find proper naming for them? thanks

*object* Naming And Using
Suppose I have a series of labels in the naming scheme of: lblLP1, lblLP2, lblLP3...

Is it possible, in some brilliant stroke of coding, to some how use a string to access the properties of the labels. For example, I have two labels: lblLP1, lblLP2. Now I have an If statement that says:

If condition 1 then someInteger = 1
Else someinteger = 2
End If

Then I want to do this:

lblLPsomeinteger.Visible (or whatever) = True.

(where someInteger is an Integer that could be added onto the end of the label name)

Is this possible?

Thanks,
rewclaus

Naming .REG File Help Please
Hi All! I'm new to programing and VB ( Well, did do a bit of batch file work back in the bad ol' day of DOS!).

Anyway, I need some help with the following.

I'm working on a program to export a registry key and save the .REG file. Right now it saves the file to a specific path and file name. The part I need help with is having the user name the file. It would still be saved to the specific path. I was thinking about calling a form with a text box where the user would input the filename (except the ".REG" which would be hard coded.) and click on a button to save the file.

(BTW- This will be running from a thumb drive. Thus the relative path.)

Right now the code I'm using is this (short & simple!):


VB Code:
'Registry Key Backup - This Works.Private Sub cmdBackup_Click()'This will export the registery info from (HKEY_LOCAL_MACHINESoftwareMyAppIIPOption)'to the app.pathShell "regedit /e ./Backups/OptionKeys.reg HKEY_LOCAL_MACHINESoftwareMyAppIIPOption"Call MsgBox("The Option Key backup has been saved.    ", vbOKOnly + vbInformation + vbApplicationModal + vbDefaultButton1, "FILE SAVE")End Sub


Thanks for any help & suggestions!

ActiveX DLL Naming
Anyone have any preferences on Names for their DLLs, the Project's Name, and the Class Names ..?

For example .. version incrementing ... when you make changes to it, is it best to rename it by Version .. Like MyDllV2, MyDllV3 .. etc ..?

Also, is it best to have a seperate DLL for each class, or only seperate them if they dont need each other....

thanks ..
Rory

Naming Conventions
I was just curious which type of naming conventions is most widely used, and most readable. I know this can be a personal preference but I was just curious how people keep local,modual,class variables identifiable.


I ask because I am looking for a change, I have been using "Polish" Notation but want to see what else is out there.


Thanks

Re-naming Files
I have a program that puts all the files with the extenstion .zip from a folder into a textbox.
My question is once I have changed the name of the file in the textbox
how would I change the original file to that name.

-Thanks

VB Naming Convention
Remember the naming convention we learned about? It's in my head, but I'd like a link to a detailed article.

Anyone got a link? Thanks.

Naming Ranges
Why do I get an error message range of method global failed. Erro code 1004. I declared in my code the following:
Dim myrange As Range
Set myrange = Range(Addr3)

Why do I get an error at the lines:
myrange.Select
myrange.Copy

Look at BLUE lines in text



Public xend As Integer
Public yend As Integer

Private Sub CommandButton4_Click()
Dim c As Integer
Dim r As Integer
Dim lastcell As Integer
Dim lastcelladdr As String
Dim firstcelladdr As String
Dim myrange As Range


Dim SelRange1 As Range
Dim SelRange2 As Range
Dim selrange3 As Range

Dim Addr1 As String
Dim Addr2 As String
Dim Addr3 As String
Dim Addr4 As String
Dim lengte1 As Integer
Dim lengte2 As Integer
Dim rijnummerbegin As String
Dim rijnummereind As String
Dim kolomref As String
Dim sheetnaam As String
Dim sheetnaam2 As String

xend = UserForm2.TextBox1.Value
yend = UserForm2.TextBox2.Value
'Get the address, or reference, from the RefEdit control.
Addr1 = RefEdit1.Value
Addr2 = RefEdit2.Value
'Set the SelRange Range object to the range specified in the
'RefEdit control.
Set SelRange1 = Range(Addr1)
Set SelRange2 = Range(Addr2)
'Apply a red pattern to the SelRange.
SelRange1.Copy
Worksheets("return_stock").Select
Range("B10").Select
sheetnaam = ActiveCell.Parent.Name 'geeft de naam vd huidige sheet aan variabele
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
SelRange2.Copy
Worksheets("return_market_index").Select
Range("B10").Select
sheetnaam2 = ActiveCell.Parent.Name
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Addr3 = RefEdit3.Value
Set myrange = Range(Addr3)
c = myrange.Cells.Count
r = myrange.Rows.Count
lastcell = (c / r) * (r - 1) + 1
lastcelladdr = myrange.Cells(lastcell).Address(rowabsolute:=False, columnabsolute:=False)
firstcelladdr = myrange.Cells(1).Address(rowabsolute:=False, columnabsolute:=False)
lengte1 = Len(lastcelladdr)
lengte2 = Len(firstcelladdr)
rijnummerbegin = Right(firstcelladdr, (lengte2 - 1))
rijnummereind = Right(lastcelladdr, (lengte1 - 1))
kolomref = Left(firstcelladdr, 1)



Dim d As Integer



Sheets("return_event").Select
Call Return_event_period

Range("B8").Select

For y = 1 To UserForm2.yend
For x = 1 To -UserForm2.xend
Cells((7 + x + (-1 * UserForm2.xend) * (y - 1)), 2).Select
ActiveCell.Formula = "=AVERAGE(" & sheetnaam & "!" & kolomref & CStr(rijnummerbegin - 1 + x) & ":" & kolomref & CStr(rijnummereind + 1 - y) & ")"
Next x
Next y


d = myrange.Columns.Count + 1
Range(Cells(8, 2), Cells(7 - UserForm2.xend * UserForm2.yend, 2)).Select

Selection.AutoFill Destination:=Range(Cells(8, 2), Cells(7 - UserForm2.xend * UserForm2.yend, d)), Type:=xlFillDefault

Dim c2 As Integer
Dim r2 As Integer
Dim lastcell2 As Integer
Dim lastcelladdr2 As String
Dim firstcelladdr2 As String
Dim myrange2 As Range

Dim lengte3 As Integer
Dim lengte4 As Integer
Dim rijnummerbegin2 As String
Dim rijnummereind2 As String
Dim kolomref2 As String



Addr4 = RefEdit4.Value
Set myrange2 = Range(Addr4)
c2 = myrange2.Cells.Count
r2 = myrange2.Rows.Count
lastcell2 = (c2 / r2) * (r2 - 1) + 1
lastcelladdr2 = myrange2.Cells(lastcell2).Address(rowabsolute:=False, columnabsolute:=False)
firstcelladdr2 = myrange2.Cells(1).Address(rowabsolute:=False, columnabsolute:=False)
lengte3 = Len(lastcelladdr2)
lengte4 = Len(firstcelladdr2)
rijnummerbegin2 = Right(firstcelladdr2, (lengte4 - 1))
rijnummereind2 = Right(lastcelladdr2, (lengte3 - 1))
kolomref2 = Left(firstcelladdr2, 1)


Worksheets("expected_return").Select
Range("B7").Select
ActiveCell.Formula = "=AVERAGE(" & sheetnaam & "!" & kolomref2 & rijnummerbegin2 & ":" & kolomref2 & rijnummereind2 & ")"

Selection.AutoFill Destination:=Range(Cells(7, 2), Cells(7, d)), Type:=xlFillDefault


Worksheets("return_stock").Select
Set myrange3 = Range(Addr2)
firstcelladdr3 = myrange3.Cells(1).Address(rowabsolute:=False, columnabsolute:=False)
lengte5 = Len(firstcelladdr3)
rijnummerbegin3 = Right(firstcelladdr3, (lengte5 - 1))
kolomref3 = Left(firstcelladdr3, 1)
Dim mrktadj As Integer
Dim m As Integer
Dim eventrowaddr As Integer
mrktadj = Abs(xend)

m = rijnummerbegin3

eventrowaddr = m + mrktadj

Worksheets("expected_return").Select
Range("B10").Select
ActiveCell.Formula = "=" & sheetnaam2 & "!" & kolomref3 & eventrowaddr

Selection.AutoFill Destination:=Range(Cells(10, 2), Cells(10, d)), Type:=xlFillDefault



Set myrange4 = Range(Addr1)
firstcelladdr4 = myrange4.Cells(1).Address(rowabsolute:=False, columnabsolute:=False)
lengte6 = Len(firstcelladdr4)
rijnummerbegin4 = Right(firstcelladdr4, (lengte6 - 1))
kolomref4 = Left(firstcelladdr4, 1)
c4 = myrange4.Cells.Count
r4 = myrange4.Rows.Count
lastcell4 = (c4 / r4 * (r4 - 1)) + 1
lastcelladdr4 = myrange4.Cells(lastcell4).Address(rowabsolute:=False, columnabsolute:=False)
lengte9 = Len(lastcelladdr4)
rijnummereind4 = Right(lastcelladdr4, (lengte9 - 1))



Set myrange5 = Range(Addr2)
firstcelladdr5 = myrange5.Cells(1).Address(rowabsolute:=False, columnabsolute:=False)
lengte7 = Len(firstcelladdr5)
rijnummerbegin5 = Right(firstcelladdr5, (lengte7 - 1))
kolomref5 = Left(firstcelladdr5, 1)
c5 = myrange5.Cells.Count
r5 = myrange5.Rows.Count
lastcell5 = (c5 / r5) * (r5 - 1) + 1
lastcelladdr5 = myrange5.Cells(lastcell5).Address(rowabsolute:=False, columnabsolute:=False)
lengte8 = Len(lastcelladdr5)
rijnummereind5 = Right(lastcelladdr5, (lengte8 - 1))
Worksheets("expected_return").Select
Range("B13").Select
ActiveCell.Formula = "=INTERCEPT(" & "return_stock!" & kolomref4 & rijnummerbegin4 & ":" & kolomref4 & rijnummereind4 & "," & "return_market_index!" & kolomref5 & rijnummerbegin5 & ":" & kolomref5 & rijnummereind5 & ")"


Range("B14").Select
ActiveCell.Formula = "=SLOPE(" & "return_stock!" & kolomref4 & rijnummerbegin4 & ":" & kolomref4 & rijnummereind4 & "," & "return_market_index!" & kolomref5 & rijnummerbegin5 & ":" & kolomref5 & rijnummereind5 & ")"

Range("B15").Select
ActiveCell.Formula = "=B13*B14"

Range("B13:B15").Select
Selection.AutoFill Destination:=Range(Cells(13, 2), Cells(15, d)), Type:=xlFillDefault

Worksheets("return_stock").Select
myrange.Select
myrange.Copy
Worksheets("return_event2").Select
Range("B10").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Worksheets("AR_mean_adj").Select
Range("B10").Select
ActiveCell.Formula = "=" & "return_event2!" & "B10-B$7"
Selection.AutoFill Destination:=Range(Cells(10, 2), Cells(rijnummereind, d)), Type:=xlFillDefault






End Sub

Naming Conventions.
hi all

I've written some functions so you can use an excel spreadsheet as a kind of database, with each sheet being a table. Currently I'm calling each function like this:

DB_addrow
DB_replacerow
DB_deleterow
DB_fetchrow
DB_affectedrows
DB_query

etc... kinda mySQL style. I'm thinking that the DB prefix is technically incorrect, so can anyone shed light on a more suitable one?

I'm also looking for a nice name to all the module... any ideas?


thanks in adance

Naming Folder
Hi

After generating a user defined name, I wish to create a folder and a file using that name....the naming of the file is not a problem, but I am struggling to generate the folder name....has anyone any ideas?? Muchly appreciated...



(the user inputs their user-id, I can create the file <user-id.xls> but I cannot name the filepath c:(user-id)<user-id> as I cannot name the folder)

Naming Objects
I'm making a program that adds objects at run-time. What I want to do is create multiple objects with "Form1.Controls.Add". Here's some code that I tried to get to work:


Code:
Dim pic As Image
Set pic = Main.Controls.Add("VB.Image", "pic")
With pic
.DragMode = 1
.Picture = LoadPicture(txtpath.Text)
.Visible = True
End With


I want to be able to run this script more than once creating multiple "pics" without getting an error message saying that there's already a control of that name. I've tried something like this:


Code:
picnum = picnum + 1
'picnum is a global var
pic.Name = "pic" + picnum


How can I get this to work?

Naming Project
It wqon't load. I think I did everything right?

Naming Conventions...
Can anyone direct me to some good sites that deal with organizing and naming not only variables but also how to design a good naming schema for forms, modules, COMs, StoredProcs?

Thanks

Re-Naming Files
ok, this is probabally really simple but,

how would i go about re-naming files?

i have a log file, and i want to put x1 at the start of the name once some data has been retrived from it.

any ideas?

Naming My App: How Can I Find Out If That Name Is Already Being Used?
Is there a place where all those apps name's are logged so that I can check whether or not my new cool appname will make me get sued? (Not that I have a new cool appname as yet )

thx,

Helger

Naming Conventions...
Got a question regarding parameter naming conventions. Thought I'd run it up the flag pole and see who salutes

In a UserControl, or a DLL that is going to be distributed for developers to use, what kind of naming conventions do you think are best?

Option1:

Code:
Public Sub Control_MouseDown(pintShift as Integer, psngMouseX as Single, psngMouseY as Single)

Option2:
Public Sub Control_MouseDown(Shift as Integer, X As Single, Y as Single)[/code]

Do you all prefer to have info about the scope and type of a variable (this also holds for parameters for subs and functions) as in "psngMouseX", or would you rather just have the name (ie: "X"). I know MS use single names for their variables, but...

What do the other pro programmers out there use?

- gaffa

Setup Naming
the p&D wizard always creates setup.exe
is there anyway to apply a meaningful name to this

Naming Standards
Iam working in vb as front end and sqlserver as backend.I would like to know the naming standards for tables
and fields in a table.
i would also like to know if it is independent of the backend we use.

VB Naming Conventions
Hi VB Gurus and Folks,

My question is really simple, but having problems getting what I need on the Internet... where do we get the naming conventions for VB? I just want to make sure that I write the code properly... like for example, command buttons are named cmdSave, or cmdClose. I want everything to look organized in my code... But I'm having problems getting help with this. Any ideas? Somebody mentioned Programmer's Guide but where do I find that?

Thanks!

Re-naming Files
Hi there

I am not sure if any other threads have covered this topic, if so could you point me in the right direction...

I am looking for some code that is used to re-name all files within a certain directory.

something along the lines of

Public sub Change_Name()
Dim File_Path as string

File_Path = "C:/my documents"

'Somehow find all files with a particular extension for me it will be .rep

'then code to change the .rep part to .txt

For "all files in directory??"
Mystring = Left(Myfilename,Instr(1,Myfilename,"."))
Mystring = Mystring & ".txt"
next

End sub

Or would it be easier using replace ?

Any help would be appreciated

Thanks
Steve

Anyone Have The MS Naming Conventions?
Can anyone help me find the M$ naming conventions? I need the standards for variables, subs and functions. Preferrably in one nice list for referrence like this:
String - str
Long - lng
Integer - int
Frames - fra
Forms - frm
Object - obj
...

Naming My Program
Hi all this is the part i hate trying to name my program. at the moment i have called it Help Desk but of course there are alredy quite a few called that so i really dont wanna go for that name any suggestions let me no thanks. The program is a fualt management piece of software btw.
thanks
from
mark

(vb6)Naming A Control
Honorable gurus,
I want to change the names of 3 option buttons of Form1 through 3 text boxes of Form2. whatever name one types out in the text boxes of Form2 those names have to be the names of the option buttons of Form1 permanently. The next time one opens Form1, he must see those names last put in the text boxes. Except putting the names in the database is it possible? please advise what to do. Thanks

pkb_pkb

Combo Box Naming
hi everyone, do u know how to name a combo box and event handler?

actually , what i m trying to do is to create several combo boxes dynamically, say, if i input number 5 , it will create 5 combo boxes with an extra one , the sixth one at the end as other control, if i input number 10, it will create 10 combo boxes with an extra one 11th at the end.
the problem here is that when i create the event handler, i dont know how to use the "name" i assigned to the last combo box. what i am doing now is creating something like

public sub ComboBox9_Click() '9 means the 9 th created combo box
...
end sub

however, i assign a specific name for the last combo box ,

dim lenCombo as Object

Set lenCombo = ActiveSheet.OLEObjects.Add(ClassType:="forms.ComboBox.1", Left:=120, Top:=312, Width:=45, Height:=17)

lenCombo.Select

For i = 0 To columnfound - 4
lenCombo.Object.AddItem lenChoice(i)
Next i

i would like to know how i can create the event handler by using the specific name ?
i m sorry for the messy description.

please advice
thanks in advance

hobee

Naming A TCP / IP Connection
I am using SQL Server 7.

I am connecting to the server on Windows NT via TCP/IP protocol.

I am connecting via the address 192.168.0.1. My question is that when i am connecting to SQL Server 7 residing on Windows NT via SQL server Enterprise manager residing in a Windows 98 OS. Under the group server it is showing the server name as 192.168.0.1 for the NT connection.

Now here if i dont want the users to see the above address can i change the above address to a particular name suppose 'Myname' so that this IP address can be hidden.

Regards
Amarjit

Naming Rules
Hi !
I am looking for standard naming rules for variable and function on VB, by extention other naming rules for object.

Thanks

Naming Conventions
Where can I get a list of the standard object and variable naming conventions?

Like str in strLastName for the variable LastName as String
Like txt in txtLastName for the object LastName as TextBox

Jason

Naming Convention
I've just got a new job. In this company nobody cares about naming convention. In the same procedure you can find variables with names : sFirst as string, strSecond as string, Third$, lFourth as string and so on. We have a meeting scheduled for tomorrow to discuss this and similar problems. Could anybody give me any source for the most usefull naming convention system?
Thank you.
Vlad

Naming Rules In VB
Hi,
i'd like to know what are the most used rules for variables naming in VB.

Locale variable all begin with l_
Members all begin with m_
and so on!

thanks!

Naming An Excel Range
Hi

I have an Excel macro and that selects certain rows (based on a text string) and then copies that row to another worksheet. This is working fine.

However, after all the necessary rows have been copied and pasted to the other sheet, I want to assign a range name to all of the copied rows. I am using the CurrentRegion.Select syntax to select all of the data, but I do not know how in VBA to give this range a name.

Any help would be great.

Thanks

Naming Cell After Sheet
Hello,
What I'am working on is a macro that will copy data to a result sheet. I dop this from different sheets in de workbook. I've allready, thanks to here, fixed that. What I want do now is give the cell that is in the collumn in front the copied data the name of the sheet. Like so:

Sheet name | Data| data| data
Other sheet | Data| data| data
etc...

Does anyone know how to do this?

Naming Code Modules
Hello All...And, for some, Happy 4th...

Sometime ago I figured out a way to give my code modules different names,
E.g:

from: Module1, Module2, Etc...

to: Blah Blah Blah Module...Etc.

Can someone refresh my memory on how I did this?

TYVM!

Copyright © 2005-08 www.BigResource.com, All rights reserved